D
dave1997_us
Hello,
I get the same o/p for the 2 pieces of code below:
Base *b = new Base ;
b->test() ;
delete b ;
vs just saying:
(new Base)->test() ;
In the second case, how is the object created and what instance of the
object do we have to "delete" at the end of the program. It's a very
fundamental thing which I seem to be getting confused at. Inputs are
welcome.
Thanks
I get the same o/p for the 2 pieces of code below:
Base *b = new Base ;
b->test() ;
delete b ;
vs just saying:
(new Base)->test() ;
In the second case, how is the object created and what instance of the
object do we have to "delete" at the end of the program. It's a very
fundamental thing which I seem to be getting confused at. Inputs are
welcome.
Thanks