主题:求解释为何无法通过编译
#include "iostream"
int main()
{
using namespace std;
string name="Visual C++.NET";
cout<<name;
return 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 t
here is no acceptable conversion)
求解释。。。
int main()
{
using namespace std;
string name="Visual C++.NET";
cout<<name;
return 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 t
here is no acceptable conversion)
求解释。。。