<分区>
Possible Duplicate:
Why does the default parameterless constructor go away when you create one with parameters
我写了下面的程序
#include <iostream>
class A {
public:
A(int i) {std::cout<<"Overloaded constructor"<<std::endl;}
}
int main() {
A obj;
return 0;
}
编译程序时出现以下错误:
没有匹配的函数来调用 A::A() 候选人是: A::A(整数) A::A(常量 A&)