callmeFilip / Thinking-in-CPP-Volume-1-2nd-Edition

Homework and Classwork repository
0 stars 0 forks source link

Chapter_14 Task_22 #287

Open callmeFilip opened 3 years ago

callmeFilip commented 3 years ago

Modify Instrument.cpp so that play( ) prints a message to cout, and Wind redefines play( ) to print a different message to cout. Run the program and explain why you probably wouldn’t want this behavior. Now put the virtual keyword (which you will learn about in Chapter 15) in front of the play( ) declaration in Instrument and observe the change in the behavior.