刚刚在教程上看到说,如果使用前者,那么语句,cout<<"first\n"; 会提示出错。
如果是 #include<iostream.h>,那么,语句cout<<"first\n";就不会出错了。
#include<iostream.h>
//using std::cout;
//using std::endl;
int main()
{
cout<<"我喜欢C++\n";
int x;
std::cin>>x;
std::cout<<x;
std::cout<<"湖南卫视最美丽的女人列表\n";
std::cout<<"第一名的成绩是: \t"<<100;
std::cout<<endl;
return 0;
}
可我使用#include<iostream.h>的时候,VC++提示我,所有的cout,std::cin等都有错误。
并提示我,std是一个未知的类,或者未知的命名空间。
是我的C++没有安装完全吗,当时装英文版,很多单词都不认识,所以只好凑合着装上去了。
例外,怎么样在提问里加进代码呢?
我点插入源代码的时候,不知道下一步如何操作了。就出现个这个