subclass
subclass
- Subject: subclass
- From: "K. Chen" <email@hidden>
- Date: Fri, 8 May 2009 09:38:46 -0700
Hi,
I'm porting C++ code with Xcode and I ran into a problem when my code tried to instantiate a class pointer with its subclass. The code looks like this:
class MyClass { --- };
class MySubclass : MyClass { --- };
MyClass *p = new MySubclass(---);
And I got the following errors on the last line above.
error: expected type-specifier before 'MySubclass'
error: cannot convert 'int*' to 'MyClass *' in initialization
error: expected ',' or ';' before 'MySubclass'
Any ideas??
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden