Just wanted to know, why i'm getting conflicting declaration error while calling the constructor??
class Base {
int a;
public:
Base() { a = 50; };
Base(int a): a(a) {
}
};
int main() {
int k = 20;
Base(k); // this should create a temp object right??
// i'm getting foll error "conflicting declaration ‘Base k’"
// why does compiler treat it has a declaration??
return 0;
}