A
Anjo Gasa
I have two classes:
// B.h
class B
{
friend class A;
//...
private:
static float rate;
}
// A.h
class A
{
//...
bool Init();
//...
}
// A.cpp
bool A:Init()
{
//...
B:rate = 5.0;
}
A.cpp comiles fine, I get an error with the linker:
error LNK2001: unresolved external symbol "private: static float rate"
Now, I've tried to find something related to this situation via Google
and I'm rifling through TC++PL, and have yet to find anything that can
explain why there is a linking error.
Anjo
// B.h
class B
{
friend class A;
//...
private:
static float rate;
}
// A.h
class A
{
//...
bool Init();
//...
}
// A.cpp
bool A:Init()
{
//...
B:rate = 5.0;
}
A.cpp comiles fine, I get an error with the linker:
error LNK2001: unresolved external symbol "private: static float rate"
Now, I've tried to find something related to this situation via Google
and I'm rifling through TC++PL, and have yet to find anything that can
explain why there is a linking error.
Anjo