| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 416 人关注过本帖
标题:文件怎么读写啊
只看楼主 加入收藏
风中飘絮
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-4-2
收藏
 问题点数:0 回复次数:0 
文件怎么读写啊

#include<iostream>
#include<fstream>
using namespace std;
int main(){
ifstream in("a.in");
ofstream out("a.out");
for(string str; getline(in,str);)
cout<<str<<endl;
}

------------------Configuration: longxiaoping008 - Win32 Debug--------------------
Compiling...
longxiaoping008.cpp
D:\VC\MSDev98\wolf\longxiaoping008.cpp(7) : error C2065: 'getline' : undeclared identifier
D:\VC\MSDev98\wolf\longxiaoping008.cpp(8) : error C2679: binary '<<' : no operator defined which takes a right-hand operand of type 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' (or there is no acceptable
conversion)
D:\VC\MSDev98\wolf\longxiaoping008.cpp(9) : warning C4508: 'main' : function should return a value; 'void' return type assumed
执行 cl.exe 时出错.

我用的是VC6.0是怎么回事啊!
帮忙大家看看

搜索更多相关主题的帖子: 文件 
2006-04-02 19:59
快速回复:文件怎么读写啊
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014840 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved