Pointers

Eugene Y. yes9111 at gmail.com
Sat Feb 14 22:50:54 PST 2009


class C
{
}

If I declare an instance of class C

C cinstance = new C();

is cinstance a pointer or is it like C++?
I'm wondering this because I tested with DMD 2.008 and if I do this

C dinstance = cinstance;

it doesn't seem to copy by value but by reference just like copying pointers
in C/C++.
If this is the case, is there any point in having pointers to Classes?


More information about the Digitalmars-d-learn mailing list