I
iceman
Hi,
I have some staic functions inside a class..Say for example
In my .hh file
class example{
private:
static int a;
public:
static void fuc();
}
now in my .ccfile
static void func()
{
a=10;
}
I get the linking time error
undefined reference to example::a
Is it because static is valid only in a file?
How can I solve this error/
Cheers
I have some staic functions inside a class..Say for example
In my .hh file
class example{
private:
static int a;
public:
static void fuc();
}
now in my .ccfile
static void func()
{
a=10;
}
I get the linking time error
undefined reference to example::a
Is it because static is valid only in a file?
How can I solve this error/
Cheers