Question About Templates
I am having a hard time grasping the difference between these two forms of syntax when dealing with templates:
- What is the difference between a class template and a function template?
- A function template is a function whos definition uses templated parameters.
- A class template is a class in which the objects created are templated. Such objects are created by doing MyClass <int> c1;
- What is a forward declaration of a class and when do I need one?
- And finally, what is the difference between:
template <class T>
andtemplate <typename T>
