私はこの問題で数日立ち往生しており、Googleが返信でいっぱいであるにもかかわらず、私の問題に対する答えを見つけることができません。これは非常に抽象的な問題のようです.
Hでの私のコードは次のとおりです。
struct DISPLAYLINE_t {
char *text;
bool isWhite;
void set(char *txt, bool iswhite){text = txt; isWhite = iswhite;};
};
struct DISPLAY {
static DISPLAYLINE_t line1,line2,line3,line4;
void clear(){//dostuff};
};
メインからアクセスしようとすると:
DISPLAY::line1.set(string, FALSE);
次のエラーが表示されます。
エラー LNK2019: 未解決の外部シンボル "public: static struct DISPLAYLINE_t DISPLAY::line1" (?line1@DISPLAY@@2UDISPLAYLINE_t@@A) が関数 WinMain で参照されています
何か案は?