#include <cstring>
...
string theString="Hello";
cout<<string<<endl;
MSVC6.0 reports:
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)
BUT
#include <string>
string theString="Hello";
cout<<string<<endl;
is OK under MSVC6.0
没有评论:
发表评论