< previous page page_928 next page >

Page 928
0928-01.gif
Figure 16-8
The Slicing Problem Resulting from Pass-by-Value
Virtual Functions
Suppose we make one small change to our Time class declaration: we begin the declaration of the Write function with the reserved word virtual.
class Time
{
public:
    .
    .
    .
   virtual void Write() const;
    .
    .
    .

 
< previous page page_928 next page >