If I have a class named Object, what\'s the difference between creating an instance just like that:
Object var;
and:
Object
Object var();
Declaration of a function that returns Object. To create an automatic object(i.e on the stack):
Object var; // You shouldn't write the parenthesis.
While:
Object* var = new Object();
Is a dynamically allocated Object.