静的メンバ変数を定義する方法は少し特殊でし。次の例のようにクラス宣言部の中で 宣言し、クラス宣言部の外部で定義する必要があります。
// testclass.h ヘッダファイ ル class testclass { : static int FHandle; //静的メンバ変数の宣言 public: : : }; // testclass.cpp 実装部 #include "testclass.h" int testclass::FHandle; //静的メンバ変数の定 義
};
// testclass.cpp 実装部 #include "testclass.h"
int testclass::FHandle; //静的メンバ変数の定 義