A o1();
This is declaring the existence of a function named o1 that takes no parameters and returns an object of type A.
Because your definition
A o1();
the compiler considers as a definition of a function that has return type A and has no parameters.
To correct your definition you should write
A o1;
Last edited on
Thanks
Spasiba:))))
Last edited on