不用那样,“类.h”是C语言字符串处理用的头文件,C++包含#include ,再写using namespace std;就可以了,要用流输入输出字符串的话再包含一个"string",而不是"string.h"就行!