constructers not allowed a return

来源:学生作业学帮网 编辑:学帮网 时间:2024/06/16 02:25:14

constructers not allowed a return

constructor函数不能有返回类型.
比如你建的类是A
constructor 就是 A() 和其他的 void a()等等函数不一样,函数名的前面不能有任何类型