In the public constructor, how do I pass to help the pointer that is coming into the constructor which I defaulted to NULL?Code:class IOField { private: int row, col; protected: void *data; IOScreen *owner; bool Ok; void (*help)(IOScreen *scrPtr); bool (*isValid)(void *data, IOScreen *scrPtr); int Row(); int Col(); public: IOField(int row, int col, void (*help)(IOScreen *) = NULL, bool (*isValid)(void *, IOScreen *) = NULL) { this->row = row; this->col = col; help(IOScreen); } };
The error is on help(IOScreen) with the message
Code:error C2275: 'IOScreen' : illegal use of this type as an expression
Edit: The same with isValid, how would I pass it whatever comes in



LinkBack URL
About LinkBacks


