Experiment with Example 5.1. Start by uncommenting the third member function and compiling.
Try uncommenting the following line just before the end of main()
:
// csd.demo(4.5);
What happened? Explain the error message.
Notice the compiler warnings about unused parameters when you build this application. Try deleting all the unused parameter names from the function heads that the compiler mentions. (Do not delete the parameter types!) Then rebuild the application and observe the compiler output. This is a good way to notify the compiler that you do not intend to use certain parameters. You can see this technique used in a more convincing way in Section 15.2.
Add other function calls and other variations on the demo()
function.
Explain each result.
[ fromfile: functions.xml id: None ]
Generated: 2012-03-02 | © 2012 Alan Ezust and Paul Ezust. |