// In A.h
class A
{
public:
enum eMyEnum{ eOne, eTwo, eThree };
public:
A(eMyEnum e);
}
// In B.h
#include "A.h"
class B
{
B();
private:
A memberA;
}
// In B.cpp
#include "B.h"
B::B(void) : memberA(A::eOne)
{}
'memberA' への宣言により、g++ コンパイラを使用してコンパイル エラーが発生します: エラー: 'A::eOne' は型ではありません
どうすればこれを克服できますか?パラメーターを取らないデフォルトのコンストラクターを作成する必要があるだけですか?