#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是怎么回事啊!
帮忙大家看看