Does anyone have an example of a complete program that uses CLASS TEMPLATES...

Apr 6, 2014 at 9:14pm
Preferably with separate class header, class implementation, and main files, and also uses the header #using namespace std;?

I understand classes but I'm completely vexed by templates.
Apr 6, 2014 at 9:21pm
I can't be bothered to find something, but your question looks dodgy anyway. Just making sure: You do know that class templates must be implemented in the header? You can't have a seperate class header to implementation with templates. Also, using namespace std; in header files is normally very bad practice.
Last edited on Apr 6, 2014 at 9:21pm
Apr 6, 2014 at 9:33pm
Just making sure: You do know that class templates must be implemented in the header? You can't have a seperate class header to implementation with templates


I'm not sure what you mean. Do you mean the actual methods of the class have to be written out in the class header?
Apr 6, 2014 at 11:34pm
Topic archived. No new replies allowed.