W
Wenjie
Hello,
Is there any difference between:
A* p = new A;
and
A* p = new A();
?
I know it must have been dicussed here, but just
not easy to search. BTW, I think
A a;
is alike new A as far as constructor call concerned
(default construtor call?) Right?
And
A a();
is just a function declaration?
Thanks and best regards,
Wenjie
Is there any difference between:
A* p = new A;
and
A* p = new A();
?
I know it must have been dicussed here, but just
not easy to search. BTW, I think
A a;
is alike new A as far as constructor call concerned
(default construtor call?) Right?
And
A a();
is just a function declaration?
Thanks and best regards,
Wenjie