N
NewToCPP
typedef int (*ActionFunction) ();
class FunctionInterface
{
static ActionFunction actionFn[3][2];
public:
static void init();
static void initActionFunctions();
static action_process1();
static action_process2();
};
void FunctionInterface::initActionFunctions()
{
for (int i = 0; i < 3; ++i)
{
for (int j = 0; j < 2; ++j)
{
actionFn[j] = 0;
}
}
actionFn[1][1] = FunctionInterface::action_process1;
actionFn[2][2] = FunctionInterface::action_process2;
}
......................
.......................
When I build this I got the following error
MyProgram error LNK2001: unresolved external symbol "private: static
int (__cdecl*(* FunctionInterface::actionFn)[2])(void)"
(?actionFn@FunctionInterface@@0PAY01P6AHXZA)
Can any one help me in this. I cant figure out why it has problem.
Thanks.
class FunctionInterface
{
static ActionFunction actionFn[3][2];
public:
static void init();
static void initActionFunctions();
static action_process1();
static action_process2();
};
void FunctionInterface::initActionFunctions()
{
for (int i = 0; i < 3; ++i)
{
for (int j = 0; j < 2; ++j)
{
actionFn[j] = 0;
}
}
actionFn[1][1] = FunctionInterface::action_process1;
actionFn[2][2] = FunctionInterface::action_process2;
}
......................
.......................
When I build this I got the following error
MyProgram error LNK2001: unresolved external symbol "private: static
int (__cdecl*(* FunctionInterface::actionFn)[2])(void)"
(?actionFn@FunctionInterface@@0PAY01P6AHXZA)
Can any one help me in this. I cant figure out why it has problem.
Thanks.