template <class xtyp_state>
class CStates
{
CStates(void);
public:
~CStates(void);
//This is called when the state is entered
virtualvoid Enter(xtyp_state*)=0;
//This is called regularly once the state is entred
virtualvoid Execute(xtyp_state*)=0;
//This is called when the state is exited
virtualvoid Exit(xtyp_state*)=0;
};
#endif
Those are pure virtual functions, and what it means is that any classes derived from CStates MUST overload Enter, Execute and Exit. It also makes CStates an abstract class, so you cannot create an instance of the class, only classes derived from it which overload the pure virtual functions. Basically abstract classes are designed specifically to be base classes and nothing more.
the "=0" means this function is a pure virtual function,
any class that includes at least one pure virtual function ,it becomes a abstract class ,which can not instantiated ,just can be the base class .
:)