本文整理汇总了C++中Video::putc方法的典型用法代码示例。如果您正苦于以下问题:C++ Video::putc方法的具体用法?C++ Video::putc怎么用?C++ Video::putc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Video
的用法示例。
在下文中一共展示了Video::putc方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
void System::main()
{
int i = 0;
enable();
devices.printDevices(video, WinMain);
video.putc(WinMain, '\n');
restart(console.start(WinMain));
}
示例2: printDevices
void Devices::printDevices(Video &IO, int window) /* Prints a list of detected drives to a window */
{
int i;
char str[21];
/* ntostr(numFD, str);
IO.prints(window, "\nFD Drives Detected: ");
IO.prints(window, str);
ntostr(numHD, str);
IO.prints(window, "\nHD Drives Detected: ");
IO.prints(window, str);*/
for(i = 0; i <= 1; i++)
{
IO.prints(window, "\nDrive "); /* Prints floppy drives installed */
IO.putc(window, 'A' + i);
IO.prints(window, ": ");
switch(floppy[i])
{
case 1:
IO.prints(window, "360kb 5.25in");
break;
case 2:
IO.prints(window, "1.2mb 5.25in");
break;
case 3:
IO.prints(window, "720kb 3.5in");
break;
case 4:
IO.prints(window, "1.44mb 3.5in");
break;
case 5:
IO.prints(window, "2.88mb 3.5in");
break;
default:
IO.prints(window, "No floppy drive");
}
}
IO.putc(window, '\n');
}
示例3: assert
void System::assert(int Window, char expr, char *error_msg) /*Different levels of kernel errors, only one so far.*/
{
video.setcolour(Window, TRED | BBLUE | BLINK); /*print error in red*/
video.prints(Window, "\n Error: ");
video.setcolour(Window, TRED | BBLUE);
video.prints(Window, error_msg);
video.putc(Window, '\n');
switch (expr)
{
case 1: /*level one. No need to restart*/
video.setcolour(Window, TCYAN | BBLUE);
return;
default: /*level zero. restart required.*/
video.prints(Window, " System halted.");
video.hidecursor(true);
break;
}
restart(0);
}