注册 登录
编程论坛 VC++/MFC

求解惑为什么在vc6.0中提示不能打开'iostream.h'

wangyp201210 发布于 2012-11-04 16:33, 1401 次点击
#include<iostream.h>
#include<string.h>


int main()
{
     string name;
     cout<<"请输入你的姓名:";
     cin>>name;
     cout<<"\nHello,"<<name<<endl;

     const int max=20;
     cout<<"max="<<max<<endl;

     return 0;
}
哪位大写帮我看看,为什么在vc6.0中总是报错
fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory
执行 cl.exe 时出错.
4 回复
#2
yuccn2012-11-04 20:44
试试#include<iostream>, 不要“.h”看看。
在 main函数的前面加上 using namespace std; 至于为什么,慢慢你就知道了
#3
博士点江山2012-11-07 22:27
     就是还是用#include<iostream>
               using namespace std;吧!这样就可以了!就不会有波浪线了`!
#4
mmmmmmmmmmmm2012-11-08 09:21

#include<iostream>
using namespace std;
#5
zhenchao17002012-11-26 22:03
#include<iostream>
using namespace std;//std空间  有上边那句就有这句
1