To be able to utilize template classes in C++.
In class today, we saw a version of a stack class that used templates to
allow us to store any kind of data in the stack. For this lab, you will have
to do the same for the IntList.cpp file.
You will then change the main function so that it creates the templated
array object properly using characters instead of integers.
- Start with the IntList.cpp file given above, but rename it to just "List.cpp"
- Also rename the class to just "List" since it now is no longer bound to integers.
- Add the template parameter line above the class as we discussed in class.
- Change the code of the class to use the type parameter instead of int wherever appropriate.
- Change the main function to create a List object of type character, leaving the rest the same.
- When done, the program should print out the upper-case alphabet!
When your program works, email the code to email@example.com.
Copyright © 2018 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.