I’ve got the following error althought I have a public static member called myMember in myClass class!
error LNK2001: unresolved external symbol “public: static float MyClass::myMember” (?myMember@MyClass@@2MA)
Note When I double click on the error it does not take me to any line in the code!
The code:
class MyClass
{
public:
static float myMember;
}
Any idea?
You only declare myMember, define it in the .cpp corresponding to your (presumed) .h containing the class: