c++ constructors not allowed a return type錯誤問題

出現這樣的問題 constructors not allowed a return type,是由於類定義或者申明時,結束的地方忘了加個’ ; ‘.net

錯誤的舉例如:code

class ClassName{

}

如上面的定義,須要在類申明結束的部分添加";"結束符號blog

正確如:get

class ClassName{

};
Reference
  1. constructors not allowed a return type錯誤問題
相關文章
相關標籤/搜索