В чем разница между объявлениями классов ниже?В чем разница между A a; и A a() ;?
class A
{
public:
A()
{
std::cout << "A()\n";
}
~A()
{
std::cout << "~A()\n";
}
};
int main(int argc, char *argv[])
{
A a; // <-- this call the constructor and destructor
A b(); // <-- this is not!! what is a b()?
return 0;
}
Что такое b()
?
Просьба не отвечать на очевидные ошибки – NathanOliver