I cannot see which problem the compiler (g++ 4.1.2) has with my code.
Is says to me:
../poollist.cc:480: error: no matching function for call to
‘TPoolList::Append(char*)’
../poollist.cc:367: note: candidates are: void TPoolList::Append
(PoolEntryKey_t&)
And this is the related part of the code:
class TList : public TWindow {
public:
void Append( char* );
// ...
};
class TScrolledList : public TList {
// ...
};
class TPoolList : public TScrolledList {
public:
void Append( PoolEntryKEy_t& );
// ...
};
TPoolList* poolList = new TPoolList;
poolList->Append( "text" );
Can someone tell me, what the problem might be? Why is the method of
the base class invisible there?
Thanks, Sven
Read about *name hiding*. Probably in the FAQ.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
http://www.parashift.com/c++-faq-lite/strange-inheritance.html#faq-23.9
(except that the FAQ example has versions of Append
that both match the parameter, so the wrong one is
silently called; at least in your example you get a
compiler error).