From my understanding of declarations and definitions, at the global scope:
MyClass instance();//Declares a function that returns a MyClass
MyClass instance;//Declares an instance of MyClass
Is it possible to declare a variable and define it to use the default constructor at global scope? What if I was using a structure instead of a class?
EDIT:
Okay, so MyClass instance;
does call the default constructor. Can anyone explain how this is consistent with this example:
int a; // not default constructed, will have random data
int b = int(); // will be initialised to zero