template with vc6
the problem is, i cant create an instance of my class i want registered, because if its created it will automatically be replicated over the network which is bad.
You can''t create an instance of it? Then what is it good for?
Do you mean you can''t create it on the heap, or that you can''t even create one on the stack using ''new''? Since the method using the downcasting works fine using any way of creation.
Do you mean you can''t create it on the heap, or that you can''t even create one on the stack using ''new''? Since the method using the downcasting works fine using any way of creation.
no i cant create in instance of it until i need it.... i cant just create them if im bored ;p
okay i found out why im getting this error in the first place:
Chat : Obj, NetObj
^ stops it compiling
Chat : Obj compiles fine
so i tried
Obj;
NetObj : Obj
Chat : NetObj
but then it doesnt work again :-/
doesnt like not directly inheriting from Obj!!!!!!
or multiple inheritence!!!!
[edited by - supagu on February 29, 2004 7:08:42 AM]
okay i found out why im getting this error in the first place:
Chat : Obj, NetObj
^ stops it compiling
Chat : Obj compiles fine
so i tried
Obj;
NetObj : Obj
Chat : NetObj
but then it doesnt work again :-/
doesnt like not directly inheriting from Obj!!!!!!
or multiple inheritence!!!!
[edited by - supagu on February 29, 2004 7:08:42 AM]
You haven''t declared a pure virtual method in NetObj and forgot to define the method in chat by any chance?
--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.
--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.
thats it !!! omG i've been trying to get that working for 3 weeks
thanks u
now another problem :-/
netobj extends obj as virtual,
and chat extends netobj as virtual, and i cant cast from obj to netobj
saying:
F:\SiphonGL\Engine\Client.cpp(176) : error C2635: cannot convert a 'Obj*' to a 'NetObj*'; conversion from a virtual base class is implied
[edited by - supagu on February 29, 2004 7:15:40 AM]
thanks u
now another problem :-/
netobj extends obj as virtual,
and chat extends netobj as virtual, and i cant cast from obj to netobj
saying:
F:\SiphonGL\Engine\Client.cpp(176) : error C2635: cannot convert a 'Obj*' to a 'NetObj*'; conversion from a virtual base class is implied
[edited by - supagu on February 29, 2004 7:15:40 AM]
I guess you could overload the = operator to do the job for you, by manually converting.
But from what i''ve read so far you have some major design-flaws. Maybe it could be a good idea to go back to the drawing-board with the modelling?
--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.
But from what i''ve read so far you have some major design-flaws. Maybe it could be a good idea to go back to the drawing-board with the modelling?
--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement