Inherit a class StringVector from vector<void> and
redefine the push_back( ) and operator[] member
functions to accept and produce only string (and
perform the proper casting). Now create a template that
will automatically make a container class to do the same
thing for pointers to any type. This technique is often
used to reduce code bloat from too many template
instantiations.
Inherit a class StringVector from vector<void> and redefine the push_back( ) and operator[] member functions to accept and produce only string (and perform the proper casting). Now create a template that will automatically make a container class to do the same thing for pointers to any type. This technique is often used to reduce code bloat from too many template instantiations.