L
Lilia
Hi All,
I have a class like this:
//================================
class foo
{
public:
static foo* foo_ptr;
void bar();
}
//================================
Then I have a member function like this:
//================================
void foo::bar()
{
foo_ptr = NULL;
}
//================================
The linker is telling me:
//================================
unresolved external symbol "public: static class foo * foo::foo_ptr" (?
foo_ptr@foo@@2PAV1@A)
//================================
Any ideas on what I'm doing wrong?
Everything is fine if I move the foo_ptr out of the class and below the
class definition in the header file, but I'd like it to be a member.
Thanks,
-L
I have a class like this:
//================================
class foo
{
public:
static foo* foo_ptr;
void bar();
}
//================================
Then I have a member function like this:
//================================
void foo::bar()
{
foo_ptr = NULL;
}
//================================
The linker is telling me:
//================================
unresolved external symbol "public: static class foo * foo::foo_ptr" (?
foo_ptr@foo@@2PAV1@A)
//================================
Any ideas on what I'm doing wrong?
Everything is fine if I move the foo_ptr out of the class and below the
class definition in the header file, but I'd like it to be a member.
Thanks,
-L