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
what is template and type convertion
Is stl part of c++ standard?
Do you like to Submit Questions in Bulk under Same Category?? Then use our Bulk ListerDo you like to Submit Questions in Bulk under Same Category?? Then use our Bulk Lister
How stl is different from the c++ standard library?
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
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.
What does stl mean in slang?
write a program to convert a decimal number in to its equivalent binary number?
Is string part of stl?
What is a standard template library (stl)? What are the various types of stl containers?
What two types of containers does the stl provide?
What are stl algorithms?
What are the different types of stl containers?
Describe the My Computer and My Documents folders; identify the elements that are present in every Window.
What is the stl, standard template library?