visual studio won't accept my class template

hi

Basically I've got a pure virtual member class with a template(CStates<qXType_state>). And the issue is that I can't get my other class's function ChangingState()//see below to accept CStates as an argument.

FAST_BOOL ChangingState(CStates<qXType_state>* qNewState)

it doesn't like how Im using qXType_state(which is a template in the class with the ChangingState function).qXType_state is essential since its part of the template of my StateMachine which has to be reused. And my problem is that I just don't understand why the CStates<qXType_state> argument is being rejected just because I'm passing a template from StateMachine (where ChangingState() is).


Additional note:
1.I'm not inheriting CStates into StateMachine (could this be a reason why it would reject it?)
2.Yet I want to use it as an argument in one of StateMachine's functions (ChangingState)


error here:
1>------ Build started: Project: Game state machine, Configuration: Debug Win32 ------
1>  game_main.cpp
1>  GAME_MANAGER.cpp
1>  Start_Menu.cpp
1>h:\year2\game software engineering gameng\mazuma engine\game state machine\statemachine.h(41): warning C4100: 'qNewState' : unreferenced formal parameter
1>          h:\year2\game software engineering gameng\mazuma engine\game state machine\statemachine.h(42) : while compiling class template member function 'unsigned char CStateMachine<qXType_state>::ChangingState(CStates<xUsers_states> *)'
1>          with
1>          [
1>              qXType_state=CGAME_MANAGER,
1>              xUsers_states=CGAME_MANAGER

Last edited on
Topic archived. No new replies allowed.