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

Define a pdb file.

0 Answers  


How const int *ourpointer differs from int const *ourpointer?

0 Answers  


What is the full form of c++?

0 Answers  


Does dev c++ support c++ 11?

0 Answers  


What do you mean by translation unit in c++?

1 Answers  


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

0 Answers  


Is c++ vector a linked list?

0 Answers  


Write syntax to define friend functions in C++.

0 Answers   HAL,


What is c++ in english?

0 Answers  


What is polymorphism in c++? Explain with an example?

0 Answers  


What is the difference between the functions memmove() and memcpy()?

0 Answers  


List down the guideline that should be followed while using friend function.

0 Answers  


Categories