请教(回帖给高分!!!!)
我用C++语言写如下代码:
#include <fstream>
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
string myStr;
cin>>myStr;
}
结果程序在VC6.0下无法通过,抱错如下:
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)
难道无法通过cin语句来输入字符串吗?
各位大虾请指点!!