when will use new ?

Posted by kam on Stack Overflow See other posts from Stack Overflow or by kam
Published on 2010-04-23T08:29:20Z Indexed on 2010/04/23 8:33 UTC
Read the original article Hit count: 336

Filed under:

Hi All,

class A
{

};

void main()
{
   A objA; // case 1

   // or
   A *p = new A; case 2;
}

when will use case 1? and when will use case2

Thanks, Kam

© Stack Overflow or respective owner

Related posts about c++