Search the web
Sign In
New User? Sign Up
cuLUG · Cairo University Linux User Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
C++ question   Message List  
Reply | Forward Message #1690 of 1764 |
Hey mates,

Ive got this abstract class, DrawableObject that has just one func (of interest to this mail) which is

class DrawableObject
{
virtual void draw() = 0;
};

now, i have another class, that is GfxEngine and it has one func, 

class GfxEngine
{
int registerObject(DrawableObject& dObject);
};

now here is my dilemma, if i keep the drawable object abstract, then i cannot pass it by value to the gfx engine func, since i cannot instantiate it, ie: the func signature cannot be int registerObject(DrawableObject dObject), and i do not want to pass it by reference, so... any ideas?

---
Cheers,
seth
<A. Helmy>
One life... LIVE it!


Mon May 12, 2008 7:16 pm

sethdarkenmore
Offline Offline
Send Email Send Email

Attachment
PGP.sig
Type:
application/pgp-signature
Forward
Message #1690 of 1764 |
Expand Messages Author Sort by Date

Hey mates, Ive got this abstract class, DrawableObject that has just one func (of interest to this mail) which is class DrawableObject { virtual void draw() =...
Ali Helmy
sethdarkenmore
Offline Send Email
May 12, 2008
7:16 pm

السلام عليكم و رحمة الله و بركاته You cannot instantiate a an abstract class. This is not only a technical constraint but in fact a...
Ahmed Hefny
cyber_modiko
Offline Send Email
May 12, 2008
8:08 pm

... ya raaaaaaaaaaaaaaaaaaaaaaaaaaagel? eih dah fe3lan? makontesh 3aref khales... harou7 2a2ra learn visual c++ in 21 days tany.. ... Maybe i wasnt clear... so...
Ali Helmy
sethdarkenmore
Offline Send Email
May 13, 2008
6:05 pm

Ali.....How are you? I guess Hefny replied your question, he just forgot a "not" [Typing mistake]. Let me rephrase: So why do*n't* you want to pass the...
Safey allah Mohammed
yaraber7amni
Offline Send Email
May 13, 2008
6:41 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help