just type:
class CSDKPlayer;
without anything .. it's a forward declaration, basically lets the
code knows that this class exists.
afaik, you can only declare _pointers_ to this class after the forward
declaration, otherwise you will have to #include the header file
containing the definition of the class.
On Fri, 10 Dec 2004 22:47:52 -0500, r00t 3:16 <[EMAIL PROTECTED]> wrote:
> I can not get this to work for the life of me.
> (Classes confuse the hell out of me)
>
> Anyways if I comment out
> if ( pPlayer->clientCommand( pcmd ) )
> return true;
> It will compile without errors
>
> If I have the follow code (shown below)
> I get use of undefined type CSDKPlayer
>
> bool CSDKGameRules::ClientCommand( const char *pcmd, CBaseEntity *pEdict )
> {
> // get a pointer to the player
>
> CSDKPlayer *pPlayer = (CSDKPlayer *) pEdict;
>
> if ( pPlayer->ClientCommand( pcmd ) )
>
> return true;
>
> // Try a client command on the gamerules
>
> if( BaseClass::ClientCommand( pcmd, pEdict ) )
> return true;
>
> }
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders