类成员函数定义在另一个文件中时为什么用不了类中数据成员?一编译就报错说 该数据没有被声明[解决办法]继续来回答,想用string就得:
#include <string>using namespace std;