[prog] C++ const method & static_cast

Karine Proot kproot at nerim.net
Sat Mar 20 19:28:38 EST 2004


Hello,

   I am trying to switch all my getters to const:
Tab *getPrevious();
   becomes
Tab *getPrevious() const;

   I have elsewhere:
buddyTab = static_cast<BuddyTab*>(tabs->getFirst()->getPrevious());

   This line fails at linking:
undefined reference to `Tab::getPrevious()'

   If someone could show me the light...

Karine



More information about the Programming mailing list