Developer Resources’s Weblog

June 7, 2008

Chapter 8 – Writing generic functions

Filed under: Accelerated C++, Book Reviews, c++ — Tags: , , , — developerresources @ 3:12 am

The Page continues the discussion of Accelerated C++: Practical Programming by Example (C++ In-Depth Series).

C++ provides templates as an ability to focus on writing generic algorithms for any number of data types. A common example is the stl vector container. When you instantiate the vector obect you provide the type of object that the vector will contain. (vector<int> for example)

In discussing generic function this chapter also focuses on iterators and the different types: Sequential read-only, Sequential write-only, Sequential read-write, Reversible, and Random access.

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.