Home arrow C++ arrow Page 9 - The Mighty C++ Template
C++

The Mighty C++ Template


One of the biggest advantages of using C++ is templates. Templates were designed from the ground up to allow developers to write one function to handle many different types of parameters. In this article, Mitchell will explain what both function and class templates are, and give examples of each.

Author Info:
By: Mitchell Harper
Rating: 5 stars5 stars5 stars5 stars5 stars / 48
November 23, 2001
TABLE OF CONTENTS:
  1. · The Mighty C++ Template
  2. · Understanding function overloading
  3. · The template
  4. · The template (contd.)
  5. · A simple class template
  6. · A simple class template (contd.)
  7. · Instantiating the class
  8. · Behind the scenes
  9. · Conclusion

print this article
SEARCH DEVARTICLES

The Mighty C++ Template - Conclusion
(Page 9 of 9 )

Templates provide the C++ developer with a whole new level of power, flexibility and robustness. Templates play a big role in several C++ libraries including the standard template library (STL) and the active template library (ATL), and fully understanding and utilizing templates where they are needed can increase the speed, cleanliness and re-useability of your code.

We have just briefly touched on templates in this article. If you want to know more about templates, take a look at the links and books shown below.
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus
C++ ARTICLES

- Intel Threading Building Blocks
- Threading Building Blocks with C++
- Video Memory Programming in Text Mode
- More Tricks to Gain Speed in Programming Con...
- Easy and Efficient Programming for Contests
- Preparing For Programming Contests
- Programming Contests: Why Bother?
- Polymorphism in C++
- Overview of Virtual Functions
- Inheritance in C++
- Extending the Basic Streams in C++
- Using Stringstreams in C++
- Custom Stream Manipulation in C++
- General Stream Manipulation in C++
- Serialize Your Class into Streams in C++

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials