Hey everyone! I was wondering if I properly used pointers correctly with this function template to swap the type's. I mean it works but did I do it in the most proper way? Any way to improve will be helpful to know thank you!
@Ryan Wilson: The danger with using pointers is the possibility that one (or both) of them will be NULL (not in your example, but in the general case) -- instant segfault and lots of debugging required. This is the advantage of using bluecoder's reference suggestion - it also removes the need to remember to pass the address of the objects (although this may or may not be an advantage, depending on your opinion on explicitness).