解脲支原体检查多少钱:为什么namespace不能用啊

来源:百度文库 编辑:高校问答 时间:2024/04/28 15:22:43
我在turbo c++ 3。1 中写c++程序 可是 为什么我输入下列代码 却提示
unable to open include file
declaration syntax error
undefined symbol"cout"

代码如下
#include<iostream>;
using namespace std;

int main()
{
cout<<"hello";
return 0;
}

但是把程序改为
#include<iostream.h>;

int main()
{
cout<<"hello";
return 0;
}
就马上正常了 请问是怎么回事啊 谢谢。。我是初学者

"#include<iostream>;"
把行尾的分号去掉,写成:

#include <iostream>

用VC++编译时要加编译选项 -GX
(否则有警告性错误:unwind semantics are not enabled)

turbo 编译时是不是也加编译选项,我不知道,你可以看编译时显示的提示