Why does this code
class A
{
public:
A()
{
cout<<"Class A!";
}
A(int a=0)
{
cout<<"A";
}
};
int main()
{
A a();
return 0;
}
... result in no output?
But if instead of A a()
I place any value, then the output is "A". And I can't just simply type A a
because it says it's ambiguous.