Say I have a class C and I want a pointer to a C handle.

I tried the following pieces of syntax:

  C* obj = new C(); // gives me a C
  C* obj = new C*(); // gives me a C**
  C* obj = C*(); // refuses to compile

Is it even possible? This sounds so newbie...
I know it's fairly simple with structs: S() gives me a struct instance, new S() gives me a ptr to a struct instance.

Reply via email to