If I have a class named Object, what\'s the difference between creating an instance just like that:
Object var;
and:
Object
This:
Object var();
Is a function declaration. It declares a function that takes no arguments and returns an Object. What you meant was:
which, as others noted, creates a variable with automatic storage duration (a.k.a, on the stack).