O
Old Monk
Hi all,
I have got a doubt in Koenig& Moo's AC++.
On page 228 and 230, authors provide definitions for Core and Grad
classes. Grad IS-A Core, i.e. public inheritance.
What puzzles me is that both have a non-virtual read member function
in the public interface.
std::istream& read(std::istream&);
It goes against the usual norm to not redefine non-virtual member
functions in derived classes (Meyers Item#37.)
Syntactically it's fine but I am suspecting if I got the authors'
wrong.
Am I missing on something?
Thanks,
Ol' Monk
I have got a doubt in Koenig& Moo's AC++.
On page 228 and 230, authors provide definitions for Core and Grad
classes. Grad IS-A Core, i.e. public inheritance.
What puzzles me is that both have a non-virtual read member function
in the public interface.
std::istream& read(std::istream&);
It goes against the usual norm to not redefine non-virtual member
functions in derived classes (Meyers Item#37.)
Syntactically it's fine but I am suspecting if I got the authors'
wrong.
Am I missing on something?
Thanks,
Ol' Monk