c++ constructors not allowed a return type错误问题

出现这样的问题 constructors not allowed a return type,是因为类定义或者申明时,结束的地方忘了加个’ ; ‘

错误的举例如:

class ClassName{

}

如上面的定义,需要在类申明结束的部分添加";"结束符号

正确如:

class ClassName{

};
Reference
  1. constructors not allowed a return type错误问题
原文地址:https://www.cnblogs.com/fsong/p/10526721.html