11.1.3. Exercises: Generics and Templates

  1. Place the function definitions for Stack in a separate file (stack.cpp), modify the project file appropriately, and then build the application. Explain the results.

  2. How general is this application (i.e., what conditions must the class T satisfy to be used here)?

  3. What limits the size of a Stack<T>?

  4. Write a template Queue<T> class and client code to test it.

[ fromfile: templates.xml id: None ]