Self Test Questions

 < Day Day Up > 



  1. In your own words explain what static polymorphism is and how it is achieved in C++ using function and class templates.

  2. In your own words give a definition of a template.

  3. How are function templates related to overloaded function?

  4. How are places reserved in source code for type substitution?

  5. How many type placeholders can a function or class template declare?

  6. If the number of type placeholders declared in a function template is greater than the number of function parameters, how can the type of extra placeholders be specified when the function is called?

  7. Why is it a good idea to group the declaration and definition of a class or function template in one header file?

  8. Is it necessary to group the declaration and definition of a class or function template in one header file?

  9. What is the purpose of an STL container adapter?

  10. What are iterators and how are they related to pointers? What's the purpose of an iterator? What benefits do you gain from using iterators to manipulate container elements vs. other iterative methods.



 < Day Day Up > 



C++ for Artists. The Art, Philosophy, and Science of Object-Oriented Programming
C++ For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming
ISBN: 1932504028
EAN: 2147483647
Year: 2003
Pages: 340
Authors: Rick Miller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net