Other source of error?Flying, i investigate it again. I think the problem may caused by the initialization of farray.
In the public part, i defined some public functions, and i initialize the farray with these public functions.
Class Object
{
public:
void retrieve() {...}
void insert() {...}
void update() {...}
private:
typedef void (Object::*Omf)();
Omf farray[3];
};
Object::Omf Object::farray[3]=
{
&Object::retrieve, &Object::insert, &Object::update
};
&Object::retrieve and such are fixed addresses, so farray must be defined as static, correct? Is this a rule defining a static member?
What are the rules for definition of static members?
TIA
only a static member can be initialize in this way
you should initialized it in you constructor instead.