J
Jonathan Bartlett
class temp
Declaring a static class variable is a lot like declaring an "extern" in
C. Not only do you need the extern, you also need the actual definition
in EXACTLY ONE source file. Therefore, somewhere you need to put:
static char temp::array[3][3];
Jon
{
public:
void init();
void setArray();
void print();
private:
static char array[3][3];
int row , col;
};
Declaring a static class variable is a lot like declaring an "extern" in
C. Not only do you need the extern, you also need the actual definition
in EXACTLY ONE source file. Therefore, somewhere you need to put:
static char temp::array[3][3];
Jon