The C++Course provides a general introduction to programming in C++. It is based on A.B. Downey's book, How to Think Like a Computer Scientist. Click here for details. |
![]() |
Home ![]() ![]() |
||
See also: Templates and Classes | ||
![]() ![]() ![]() ![]() ![]() ![]() |
||
The Pitfalls of Templates
However, if the datatype, class, or struct that you use SOMETYPE to represent does not have a += operator defined, then the compiler, specifically, the linker will give you an error and your start losing hair. Don't worry, this is all a part of the sometimes seemingly difficult process of getting templates and the like to work. Have fun.
|
||
Home ![]() ![]() |