2
豆蔻问题:错误:构造函数是私有
这里是类:
class Author
{
Author(const std::string& name, const std::string& email, Gender gender);
Author& setName(const std::string& name);
private:
std::string a_name;
std::string a_email;
int a_gender;
}
,我不知道为什么,他写了一个错误:
错误:“作者:: Author(const string &,const string &,Gender)'is private |
但它是无用的构造函数,所以他为什么不能得到aches?
坦克!
把市民:在构造函数 – 2015-04-03 14:31:18
或更换的前''通过struct' class'。并添加尾随的';'。 – juanchopanza 2015-04-03 14:32:33