Overriding Base-class data member in a Derived-class

hello all,

I'm creating a Base-class with a GetVersion function.
I want each Derived class to return a unique answer.

The compiler (GCC) insists the Base class have a declared name variable.

I am not figuring out how to have each derived class override it with their own version.

Any suggestions appreciated.
Thanks
The compiler (GCC) insists the Base class have a declared name variable.
Please don't paraphrase errors, just post exactly the error(s) you get.
@L B - thanks for the newbie guidance

BaseC.cpp: In member function ‘const std::string BaseC::GetVersion()’:
BaseC.cpp:error: ‘Version’ was not declared in this scope


I am not understanding where to define 'Version' in each Derived class to allow them to reply with their own value.

Topic archived. No new replies allowed.