I have found something wierd which I don't understand.
std::string a();
When printed out it returns 1
. I have no idea where it came from. I thought a()
is a constructor without arguments, but it looks like it isn't.
Where can I find information about this? and what is this?
And when trying to do std::string b(a);
compiler shouts:
error: no matching function for call to ‘std::basic_string<char>::basic_string(std::string (&)())’
Explanation would be appreciated.