-2

私の Service.h には次のものがあります。

#include "Configuration.h"

そして私のクラスでは:

private:
ConfigurationInterface* configuration_;

次に、私の Service.cpp で:

Service::Service(Foundation::Framework* framework) : 
        framework_(framework)
    {

  configuration_ = new Configuration();
    }

以降...

 const Info GetInfo()
 {
  return configuration_->getInfo();
 }

宣言されていない識別子エラーが発生します.... (configuration_)

どうして?

EDIT:Cedric H.が言ったように:「ConfigurationInterfaceは抽象クラスであり、Configurationはそれから継承します」

4

2 に答える 2

3

変化する

const Info GetInfo()

const Info Service::GetInfo()
于 2010-09-01T09:47:49.070 に答える
0

configuration_ = 新しい ConfigurationInterface();

于 2010-09-01T09:41:08.173 に答える