constructers not allowed a return

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/12 20:08:20

constructers not allowed a return
constructers not allowed a return

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