The slides used in the presentation in today's class include
We also looked at some issues with C++ function templates, based on the sample code Save the second file to a local directory and continue modifying it and checking with a compiler (or more than one compiler) your answers to the questions. Usually, though, one can't base definitive answers just on the results of compiling. Even assuming the compiler your using is correct (not always the case), the special case you are testing may not be representative of the general rules defining the language. So get in the habit of approaching questions like these with an arsenal of tools and resources: one or more (up to date) compilers, one or more (up to date) textbooks, and--most authoritative, if not always easy to understand--the C++ Standard.
|