Ask your own question, for FREE!
Computer Science 7 Online
OpenStudy (anonymous):

http://ideone.com/zWsAs So I'm just getting started with C++ templates, and this is what I've tried. Am I doing it properly, or have I committed malpractice somehow? Also, how do I rewrite all this by using C++ vectors instead of nasty arrays? I've never used vectors before but I heard they are like restricted Python lists :-D

OpenStudy (anonymous):

Also, what are the speed differences between my C++ code and this C code: http://ideone.com/Hfsgg

OpenStudy (rsmith6559):

AFAIK, the template only declares the datatype that is being operated on by the function. Here is a function heading that I wrote last summer: template<typename N> void BinarySearchTree<N>::recursiveAdd( nodeT* & curNode, N* & data ) N is the user's data object.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!