S
Shuo Xiang
Greetings:
For the following code:
class foo
{
...
private:
static const int x=3;
}
void foo::bar()
{
int i=x;
}
---
When it is linked the linker always complains of "undefined reference to
`foo::x'", why?
Regards,
Shuo
For the following code:
class foo
{
...
private:
static const int x=3;
}
void foo::bar()
{
int i=x;
}
---
When it is linked the linker always complains of "undefined reference to
`foo::x'", why?
Regards,
Shuo