编译问题

wuchengwei 2006-03-13 11:25:20
f:\language\visual studio\vc98\include\ios(9) : fatal error C1083: Cannot open include file: 'streambuf': No such file or directory
Error executing cl.exe.


这是什么意思啊
...全文
129 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
woxinyongheng 2006-03-13
  • 打赏
  • 举报
回复
#include <iostream>
using namespace std;
class CPrint{
public:
~CPrint(){
cout<<"黄河入海流,\n"<<"欲穷千里目,\n"<<"更上一层楼,\n";
}
};



int main(){
CPrint g_print;
cout<<"白日依山尽,\n";
return 0;
}
wuchengwei 2006-03-13
  • 打赏
  • 举报
回复
zh28170:你改得不对
lonelyforest 2006-03-13
  • 打赏
  • 举报
回复
终于见到程序中有诗意了! 哈哈
zh2817 2006-03-13
  • 打赏
  • 举报
回复
#include<iostream>
using namespace std;
class CPrint
{
public:
CPrint()
{
cout<<"黄河入海流,\n"<<"欲穷千里目,\n"<<"更上一层楼,\n";
}

};

CPrint g_print;

int main()
{
cout<<"白日依山尽,\n";
return 0;
}
ykzhujiang 2006-03-13
  • 打赏
  • 举报
回复
把ostream改成iostream在VC6中编译通过


PS:你用的是什么STL库?
wuchengwei 2006-03-13
  • 打赏
  • 举报
回复
程序里没有用到这个头文件,VC的目录路径是没错的,其他的程序都可以正常运行
打开IOS.H里也找到了streambuf字段,可惜看不懂头文件,
你们把这个程序运行下,看可以不
帮帮忙啊
wuchengwei 2006-03-13
  • 打赏
  • 举报
回复
代码是我今天从论坛上看到的,很短
#include<ostream>
using namespace std;
class CPrint{
public:
~CPrint(){
cout<<"黄河入海流,\n"<<"欲穷千里目,\n"<<"更上一层楼,\n";
}
};

CPrint g_print;

int main(){
cout<<"白日依山尽,\n";
return 0;
}
逸学堂 2006-03-13
  • 打赏
  • 举报
回复
streambuf,没有找到这个头文件,检查一下是否有这个文件。
healer_kx 2006-03-13
  • 打赏
  • 举报
回复
Additional include的路径
xyking361 2006-03-13
  • 打赏
  • 举报
回复
路径不对吧。看看你的tools->options->directories里头有没有C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE路径阿。没有就加进去。加进去还没有就是少文件了。考一个过来。

64,682

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧