// Test.cpp : Defines the entry point for the console application.
//
#include <stdio.h>
#include <conio.h>
int main(int argc, char* argv[])
{
printf("Hello World test 1!\n");
while(1)
{
if (kbhit())
{
if ('q' == getch())
{
break;
}
}
}
return 0;
}
本文介绍了一个简单的C++控制台应用程序实例,演示了如何使用标准输入输出以及如何响应键盘输入来控制程序流程。该程序输出Hello World test1!并等待用户按下 'q' 键退出。
972

被折叠的 条评论
为什么被折叠?



