I've a question about an error I get by inherenting a template base class. I get this error in my subclass source file:
error: class ‘JobCalcReturn’ does not have any field named ‘JobMaster’
my base class as a *.h file:
template<class dataIn, class dataOut>
class JobMaster
{
public:
JobMaster() : JSONin("NOP"){};
JobMaster(const std::string &_JSONin) : JSONin(_JSONin){};
virtual ~JobMaster(){};
private:
static dataIn dataInObject;
static dataOut dataOutObject;
const std::string &JSONin;
static std::string JSONout;
virtual std::string dataInHandler(dataIn& dataInObject){...};
//Some more virutal methodes
};
my subclass header:
class DataInClass{...};
class JobCalcReturn :public JobMaster<DataInClass, Poco::JSON::Array>
{
public:
JobCalcReturn(const std::string &_JSONin);
~JobCalcReturn();
private:
std::string dataInHandler(DataInClass& calcRatrunData);
};
my subclass source file:
JobCalcReturn::JobCalcReturn(const std::string& _JSONin) : JobMaster(_JSONin){}
//here in the constructor i get the error
JobCalcReturn::~JobCalcReturn(){}
std::string JobCalcReturn::dataInHandler(DataInClass& calcRatrunData){...}
I wrote this with Visual Studio 2013 and got no error, then I switch the system to Linux with eclipse and the gcc c++ compieler and I get this error. Does someone has a clue why I get this error?