Suppose I have the following class:
class dog
{
public:
int age;
int bun;
};
Now this statement
dog d = {12,5}
would initialize age to 12 and bun to 5
Now if the class above has a parameter-less constructor the above statement initialization does not work. I would appreciate it if someone could explain why that happens?