<span style="white-space:pre"> </span> <span style="white-space:pre"> </span>2015年1月9日20:35:49
#include <iostream>
std::string str_value = "中国";
std::cout << str_value << std::endl;
将会报错:error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)
需要导入string文件
<pre name="code" class="html">#include <iostream>
#include <string>
std::string str_value = "中国";
std::cout << str_value << std::endl;