c++析构函数运行报错:error LNK2019: 无法解析的外部符号 “public: __thiscall student::~student(void)“ (??1student@@QAE@X
我先举一个错误的例子看看我们的代码有没有相似之处:#include<iostream>#include<string>using namespace std;class student { int m_nu; string m_name;public: student() { cout << "默认构造函数的创建" << endl; } student(int m, string n) :m_nu(m), m_name(n) {}
原创
2020-07-24 10:51:54 ·
2979 阅读 ·
2 评论