Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

operator new overloading

6 views
Skip to first unread message

Alamelu

unread,
Sep 23, 2008, 2:27:01 PM9/23/08
to
I have overloaded a new operater for a class that returns void * and i have
created an object for that class in heap as below.

CMyClass *pMyClass = new CMyClass(); // Here though i haven't explicitly
casted void* to CMyClass, the compiler doesnt give error at all.

But in c++ for void* to specific type ptr , explicite cast is required. What
was the cause for the above statement to work?

Regards,
Alamelu

Dan Freeman

unread,
Sep 23, 2008, 4:19:50 PM9/23/08
to
I dunno, but it would sure throw an exception in Visual FoxPro which is the
subject of this newsgroup. ;-)

Dan

0 new messages