Re: subclass
Re: subclass
- Subject: Re: subclass
- From: David Rowland <email@hidden>
- Date: Fri, 8 May 2009 11:05:42 -0700
On May 8, 2009, at 9:38 AM, K. Chen wrote: 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'
It looks OK on the surface, but it isn't testable as it stands, too much is absent. What does --- stand for? And in what code block does the assignment statement reside?
David
|
_______________________________________________
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
References: | |
| >subclass (From: "K. Chen" <email@hidden>) |