错误:constructors not allowed a return type

来源:互联网 发布:软件漏洞挖掘教程 编辑:程序博客网 时间:2024/05/19 17:49

现象:编译时报错,说类的函数不允许有返回值,双击错误提示,光标出现在构造函数处

“ : error C2533: '类名::{ctor}' : constructors not allowed a return type”

原因:在定义该类的最后忘记加“;”了~~~~~~(o(∩_∩)o...下次不要这么粗心了)

原创粉丝点击