Hi All,
Following is some code from Quantum Programming book,
class Fsm {
public:
typedef void // return value
(Fsm::* // class the function pointer is a member of
State) // pointer-to-member name
(unsigned const sig); // argument list
Fsm(State initial) : myState(initial) {} // ctor
virtual ~Fsm() {} // virtual xtor
…
protected:
State myState;
};
class CParser4 : public Fsm {
private:
void initial(unsigned const); //Line 33 // state-handler
…
public:
CParser4() : Fsm((State)initial) {} //Line 39 // ctor
};
I compile it under QNX 6.3.0 with error message as below:
C:/QNX630/workspace/CPARSER4/cparser4.h: In method CParser4::CParser4()': C:/QNX630/workspace/CPARSER4/cparser4.h:39: no matches converting function
initial’ to type `void (Fsm::*)(unsigned int)’
C:/QNX630/workspace/CPARSER4/cparser4.h:33: candidates are: void CParser4::initial(unsigned int)
I would be very appreciated for your help.
thanks a lot.
shilunz