Home Segments Index Top Previous Next

544: Practice

Suppose that you add the following member function definition to the box class definition in the program shown in Segment 541.

virtual char* short_name ( ) { 
  return "box"; 
} 

What happens? Explain your answer.