Your AddData from the base is hidden by the AddData from derived class. Either explicitly qualify the call DataLogger>::AddData(...) or bring it to scope with using DataLogger>::AddData.
DataLogger>::AddData(...)" this one worked. But I didn't understand the mechanism behind it. AddData() in the base class is not static.
How can we call it in this format? – hkBattousai Jan 6 '11 at 16:19 1 You tell the compiler where the method is from. The shorter version is to say ::AddData(..) -- use the previous parent class where AddData was declared.
– Raphael B. Jan 6 '11 at 16:24 @Rapheal B. : When I use the short version "::AddData()", compiler gives this error: "Error C2039: 'AddData' : is not a member of '`global namespace''".
– hkBattousai Jan 6 '11 at 16:27 Did you tried ::AddData(x, y)? – Raphael B. Jan 6 '11 at 19:18 @Rapheal B.
: I said I tried it. – hkBattousai Jan 6 '117 at 9:47.
Your AddData in derived class hides the function AddData in the base class, so all you need to do is, unhide the latter using using directive: class Plotter : public DataLogger> { public: //unhiding : bringing base class function into scope! Using DataLogger>::AddData; }; Read Item 33: Avoid hiding inherited names from Effective C++ by Scott Meyers.
In order to call the super class method write ::AddData(x, y);. The new Plotter::AddData method makes DataLogger::AddData invisible.
Supper class is making me hungry ;) – Moo-Juice Jan 6 '11 at 15:27.
The problem is not "that I can not access to the method in base class from derived class, even though it is defined public". The problem is that Plotter::AddData is trying to call itself (with a pair) instead of the AddData in the base class. You can make the call explicit by writing void Plotter::AddData(long double x, long double y) { DataLogger>::AddData(std::make_pair(x, y)); }.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.