In what cases using of a 'template' is a better approach
then using of a 'base class'?

Answer Posted / ashwini kumar

Template is used when you have to use different data types
in a single Class.In run time compiler alloate memory for
data.Template is also used to reduce the complicity of any
program,But in base class Complexity is high in larger
program,because you have to create different class for
passing different data types.In template you can create
only one.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is stl in oop?

932


help me i need a c++ program which takes sequesnce of characters and outputed sequence of their token taypes, work same compiler in lexical analysis phase

2133


When did c++ add stl?

943


totoo po ba ang manga aliens!

2531


What are the symptoms of stl?

826


Can we use stl in coding interviews?

1545


Explain stl.

1094


What are the various types of stl containers?

923


Is stl open source?

848


Define stl.

1027


sir please send me bpcl previous question papers

2152


How connect plc and pc through software

2164


i wanted to know about questions about c,c++ , which is required for placements.... im a fresher

1918


How do you convert stl to steps?

839


how can u do connectivity in c++ language? plz send me connectivity code in c++ ?

2098