新建win32控制台应用程序,然后项目|添加新项,选择CPP文件。在其中输入如下程序:
#include <iostream.h>
void main()
{
cout<<"please"<<endl;
}
fatal error C1083: 无法打开包括文件:“iostream.h”: No such file or directory
#include <iostream.h>
void main()
{
cout<<"please"<<endl;
}
fatal error C1083: 无法打开包括文件:“iostream.h”: No such file or directory
==========
改成iostream试试
using namespace std;
using namespace std;
但是为什么输出“please”的DOC窗口会自动消失,只有第一次我看清输出的是“please”了,再运行,窗口消失的太快,我根本没时间看清楚。
如果像VC6.0,让我“Press any key to continue”,就好了。
cout<<"please"<<endl;
System("pause");
2)
cout<<"please"<<endl;
cout<<"Press any key to continue"<<endl;
getchar();//getch()?等待用户输入的C函数
3)
cout<<"please"<<endl;
cout<<"Press any key to continue"<<endl;
for( ; ; )
{
检测键盘的API
}
等等,方法很多啊