C++ error: 'string' does not name a type
include一个定义结构体的文件typedef.h
编译出现了error: 'string' does not name a type
查资料http://blog.csdn.net/niro_z/article/details/8028996得到提示,
要在string改为std::string就OK了。
但是这样还是有点别扭,于是这么改
using namespace std; #include "typedef.h"
就OK了