Initializing the static member TestClassObject showing an error LNK2001: unresolved external symbol.
class TestClass
{
public:
string sClassName;
string sName;
string sDescription;
};
class TestA
{
private:
static void InitInfo();
static TestClass TestClassObject;
};
void TestA::InitInfo()
{
TestClassObject.sName = "Name";
TestClassObject.sClassName = "ClassName";
TestClassObject.sDescription = "Description of class";
}