簡単に言えば:
foo.h:
#include "bar.h"
class foo {
private:
bar it;
void DoIt();
}
bar.h:
class bar {
public:
void Test();
}
foo.cpp:
void foo::DoIt() {
it.Test();
}
これにより、次のようになります。
エラーLNK2001:未解決の外部シンボル
なんで?
簡単に言えば:
foo.h:
#include "bar.h"
class foo {
private:
bar it;
void DoIt();
}
bar.h:
class bar {
public:
void Test();
}
foo.cpp:
void foo::DoIt() {
it.Test();
}
これにより、次のようになります。
エラーLNK2001:未解決の外部シンボル
なんで?