Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


When is a template better solution than a base class??

Answers were Sorted based on User's Feedback



When is a template better solution than a base class??..

Answer / mayank kumar

as template is in form of generic class and generic
function so here the class and function works for all. also
in template we can change the data type of function
parameter as well as of the data member present in class.

Is This Answer Correct ?    7 Yes 0 No

When is a template better solution than a base class??..

Answer / faruk

1.when you are designing a generic class to contain or otherwise manage objects of other types.
2.when the format and behaviour of those other types are unimportant to their containment or management.
3.particularly when those other types are unknown.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More C++ General Interview Questions

Will a catch statement catch a derived exception if it is looking for the base class?

0 Answers  


What is virtual constructor paradigm?

5 Answers   HCL, HP,


What is the use of class in c++?

0 Answers  


What is insertion sorting?

0 Answers  


How do you link a C++ program to C functions?

4 Answers  


What is a friend function in c++?

2 Answers  


Explain about profiling?

1 Answers  


Is sorted c++?

0 Answers  


wap to accept 10 numbers & display the number of odd and even numbers??

1 Answers  


Explain the term memory alignment?

0 Answers  


Differentiate between a pointer and a reference with respect to c++.

0 Answers  


Can I create my own functions in c++?

0 Answers  


Categories