#172151 - Azenris - Tue Jan 19, 2010 5:32 pm
I have a class within a lib
I can call SetState, StateHasChanged, HasActiveState, GetLastState
but when i try to call SetLastState (one i recently added) it says "error: 'class CStateManager' has no member named 'SetLastState'"
Its called with
I tried a full rebuild on both the lib and main project. I tried reopening the editors. I also tried renaming SetLastState to "Boo", nothing worked. Is it something simple I'm missing? :(
_________________
My Homebrew Games
Code: |
// ================================================================================
// CLASS: CStateManager class CStateManager : public IManager { public: CStateManager(void); ~CStateManager(void); // ============================================================================ // PUBLIC FUNCTIONS: public: void Initialise(void); void Release(void); void Reset(void); void Update(void); void SetState(IState *pState); void SetLastState(void); inline bool StateHasChanged(void) const {return m_stateChanged;} inline bool HasActiveState(void) const {return m_pCurrentState != NULL;} inline IState *GetLastState(void) const {return m_pLastState;} // ============================================================================ // PRIVATE VARIABLES: private: IState *m_pCurrentState; // the currently running state IState *m_pLastState; // the last used state bool m_stateChanged; // indicates whether the state changed this frame }; |
I can call SetState, StateHasChanged, HasActiveState, GetLastState
but when i try to call SetLastState (one i recently added) it says "error: 'class CStateManager' has no member named 'SetLastState'"
Code: |
// ================================================================================
// SetLastState: void CStateManager::SetLastState(void) { SetState(GetLastState()); } |
Its called with
Code: |
GetStateManager()->SetLastState(); |
Code: |
inline CStateManager *GetStateManager(void) const {return m_pStateManager;} |
Code: |
CStateManager *m_pStateManager; // state manager, handles the different game states |
I tried a full rebuild on both the lib and main project. I tried reopening the editors. I also tried renaming SetLastState to "Boo", nothing worked. Is it something simple I'm missing? :(
_________________
My Homebrew Games