初学C++ 编译遇到这个错误!后来在查找原来是忘了#include<string>却写了using std::string; 以为已经对使用string进行了定义声明using std:string;只是确保在以后使用中可以不用一直写std:string,而这个#include<string>这个出现后才能用!不能单独用using std::string; 错误提示如下:
c:\documents and settings\sbgc40\my documents\visual studio 2010\projects\helloc\helloc\main.cpp(11): error C2679: 二进制“<<”: 没有找到接受“const std::basic_string<_Elem,_Traits,_Ax>”类型的右操作数的运算符(或没有可接受的转换)