Abstract member classes
by Marvin Hawkins · in General Discussion · 01/16/2006 (12:13 pm) · 4 replies
Hello I'm not sure if this is the right place to post this but since I feel this is a general problem here goes.
I'm recieving an error from this line of code
class SetTeamEvent : public NetEvent
The error states that since it is an abstract class it cannot instatiate the object. I looked up the definition of Error C2259. It says that if a class doesn't use all the functions of an interface then it is considered abstract and cannot be used.
Here's the remedies suggested:
Make the access permissions public for the implemented methods.
*
Use the scope resolution operator for the interface methods implemented in the derived class to qualify the implemented method name with the name of the interface.
But since I'm new to programming I have no idea how to do that? Can anyone help?
I'm recieving an error from this line of code
class SetTeamEvent : public NetEvent
The error states that since it is an abstract class it cannot instatiate the object. I looked up the definition of Error C2259. It says that if a class doesn't use all the functions of an interface then it is considered abstract and cannot be used.
Here's the remedies suggested:
Make the access permissions public for the implemented methods.
*
Use the scope resolution operator for the interface methods implemented in the derived class to qualify the implemented method name with the name of the interface.
But since I'm new to programming I have no idea how to do that? Can anyone help?
#2
Don't post here--this is a public forum!
01/16/2006 (3:29 pm)
It might also help us out if you go to the private forums and enter in the SetTeamEvent declaration that you are using, would help us see if there is anything that got accepted by the compiler (or didn't, as in this case) but doesn't really make sense.Don't post here--this is a public forum!
#3
Everyone in the forum says that both ways work for them but When I try to use the scripts in the first example I get nothing. I get the error mentioned above when I try the option of changing the engine that's mentioned toward the bottom.
01/16/2006 (3:58 pm)
I don't know I'm trying to reproduce this lag issue from this [url] http://www.garagegames.com/mg/forums/result.thread.php?qt=23533 [/url]Everyone in the forum says that both ways work for them but When I try to use the scripts in the first example I get nothing. I get the error mentioned above when I try the option of changing the engine that's mentioned toward the bottom.
#4
01/16/2006 (4:05 pm)
Oops over to private I go
Associate Orion Elenzil
Real Life Plus
it's a sign that maybe you want to look around for other ways to get the job done.
- which is not to say that you can't make the class instantiable, just that there's probably a better way to do whatever it is you want.
eg,
would a commandToClient() script call work ?
or, if you're sure you want a new net event,
maybe there's some subclass of netEvent which would make a better starting point.