S
Sashi
Hi, when I run the following piece, I don't get any output, suggesting
that the default c'tor is not being called. Why?
#include <iostream>
class A{
public:
A(){std::cout<<"Null \n";};
A(int x = 2, int y = 4){std::cout<<"Not Null \n";};
};
int main(){
A a();
}
Thanks,
Sashi
that the default c'tor is not being called. Why?
#include <iostream>
class A{
public:
A(){std::cout<<"Null \n";};
A(int x = 2, int y = 4){std::cout<<"Not Null \n";};
};
int main(){
A a();
}
Thanks,
Sashi