Possible Duplicate:
Why does the default parameterless constructor go away when you create one with parameters
I wrote the following program
#include <iostream>
class A {
public:
A(int i) {std::cout<<"Overloaded constructor"<<std::endl;}
}
int main() {
A obj;
return 0;
}
when I compile the program I am getting the following error:
no matching function to call A::A() candidates are: A::A(int) A::A(const A&)