This question already has an answer here:
- Avoid the most vexing parse 3 answers
If I have a following situation:
#include <iostream>
using namespace std;
class A {
public:
A() {
cout<<"Inside A"<<endl;
}
};
int main() {
A a();
return 0;
}
Why the constructor is not invoked?
Aucun commentaire:
Enregistrer un commentaire