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

How does an stl file work?

648


what is template and type convertion

1992


What are the symptoms of stl?

600


how to making game in c++ ?

2177


How do I convert a stl file?

562






Is stl open source?

629


To modify an, existing worksheet. What steps are involved for: 1. Inserting and deleting rows and columns. 2. Printing cell formulas 3Jld displayed values 3. Using the page setup command

1775


In what scenario does the Logical file and Physical file being used?

2321


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

1879


What is a list in c++ stl?

689


Can we use stl in coding interviews?

1273


Describe the My Computer and My Documents folders; identify the elements that are present in every Window.

1853


Why should a c++ programmer be interested in stl?

638


What are stl algorithms?

619


What is stl stack?

658