Class Templates Exercises

  < Previous  Next >
In a group of 2-4 people, do the following:
  1. Answer how do class templates differ from function templates?
  2. Traditionally, declarations are made in a header (.h) file and implementations are in a source code (.cpp) file. Discuss with your group for a templated class what is different and why.
  3. Write a templated Calculator class with two private data members and one or more member methods.

Last Modified: