class A{
private:
string a;
public:
A():a("hello world"){};
A(const string & arg):a(arg){};
void put()const{cout<<a;};
};
A aaa();
A bbb;
So what’s the difference between A aaa(); and A bbb; Is aaa a function?
Yes, the first one is interpreted as a function declaration. It’s been called the Most Vexing Parse.