为什么Cannot open include file: 'streambuf'
来源:百度知道 编辑:UC知道 时间:2024/05/21 21:48:15
#include<iostream>
using namespace std;
void main()
{
cout<<"a";
}
d:\学习\vc++\vc98\include\ios(9) : fatal error C1083: Cannot open include file: 'streambuf': No such file or directory
Error executing cl.exe.
但是用
#include<iostream.h>
void main()
{
cout<<"a";
}就可以
请问为什么?
我下的是VC++6.0啊
using namespace std;
void main()
{
cout<<"a";
}
d:\学习\vc++\vc98\include\ios(9) : fatal error C1083: Cannot open include file: 'streambuf': No such file or directory
Error executing cl.exe.
但是用
#include<iostream.h>
void main()
{
cout<<"a";
}就可以
请问为什么?
我下的是VC++6.0啊
因为编译环境的不同,在环境中的库里没有STREAMBUF这个文件.
解决办法是:
首先是检查工具->选项->目录里路径是否正确,一般为:
C:\Program File\VC6\VC98\INCLUDE
C:\Program File\VC6\VC98\MFC\INCLUDE
C:\Program File\VC6\VC98\ATL\INCLUDE
streambuf头文件一般在第一行的目录里。
如果目录正确的话可以进目录找下streambuf文件,有些VC安装好后,文件名可能是错的,例如streambuf写成了STREAMBF,改成STREAMBUF就可以了。
同样的,改完这个问题之后也有可能会碰到类似的问题,按同样的方法一般可以解决。
如果目录下找不到文件的话可以到网上下载streambuf.h这个头文件。
因为你的编译器版本老
iostream.h是先出来的,iostream是后面才出来的,基本上涵盖了.h的所有东西,你的编译器版本太老,还没加载iostream这个库
这个才是解决问题的方法
OPTIONS中DIRECTORIES选项中
路径VC98改成VC++6.0所在路径就OK了
为什么打开游戏 天龙八部时会有cannot open driver字样
为什么Cannot open include file: 'streambuf'
我第一次用samplitude,放音的时候为什么告诉我Cannot open waveform...
为什么我打开跑跑卡丁车时会弹出"cannot open nmco server!
为什么每次编译VC++程序都会弹出1083错误?fatal error C1083: Cannot open
why my computer all program cannot open?!
javax.servlet.ServletException: Cannot open connection
org.hibernate.exception.JDBCConnectionException: Cannot open connection
org.hibernate.exception.GenericJDBCException: Cannot open connection
为什么出现fatal error C1083: Cannot open include file: 'streambuf': No such file or directory