D
denis_browne
When writing the following code:
class Base
{
Base(const Base &rhs) {}
~Base();
};
void f() {
Base b;
};
The compiler shouts: no appropriate default constructor available
But when changing it to:
void f() {
Base b();
};
it compiles. Why?
class Base
{
Base(const Base &rhs) {}
~Base();
};
void f() {
Base b;
};
The compiler shouts: no appropriate default constructor available
But when changing it to:
void f() {
Base b();
};
it compiles. Why?