|
-
May 9th, 2010, 08:38 PM
#1
virtual function question
I had a question about base classes that have virtual functions. If we have base class shape and then there is a derive class object rectangle with additional member length.
And we define
shape *s= new rectangle;
int length= s->length;
Will this work if length is an integer and public member of derived class rectangle and shape is pure abstract class?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|