can any one please elaborate why template is being used i dont understand in most of the google page they say that we can reuse the code but even in inheritance we do that .why templates?????
rithish
13
Junior Poster in Training
Recommended Answers
Jump to Postwhy templates? So that you don't have to write different functions that all do the same thing but with different data types. That's how its done in C language. For example if I need a function that returns the sum of two numbers but it need to handle int, float, …
All 2 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
mike_2000_17
2,669
21st Century Viking
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.