View Single Post
Re: need a 2nd pair of eyes for c++ inheritance problem
Old
  (#4)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: need a 2nd pair of eyes for c++ inheritance problem - 22-03-2004

What you are trying to do you need to use C++ Templates for.

Templates allow you to create functions that take any arbitrary data type and operate on them. For example you could have a sort function that takes ints, floats, chars, character string pointers, automobile classes, fishing hook classes, pointers to structures, etc.

See the cplusplus.com tutorial on templates...

http://www.cplusplus.com/doc/tutorial/tut5-1.html

botman
  
Reply With Quote