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??

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).

1045


Is it possible for a member function to use delete this?

1132


Briefly describe a B+ tree. What is bulk loading in it?

1393


What is c++ runtime?

1153


How do you print a string on the printer?

1081


How would you use the functions memcpy(), memset(), memmove()?

1142


What is virtual function? Explain with an example

1143


what kind of projects are suitable for c and c++

1086


Can malloc be used in c++?

1126


Why c++ does not have finally?

1146


Define linked lists with the help of an example.

1074


what is the difference between linear list linked representaion and linked representation? what is the purpose of representing the linear list in linked represention ? is it not avoiding rules of linear represention?

2412


Can a class be static in c++?

1139


Where do I find the current c or c++ standard documents?

1134


Differentiate between declaration and definition.

1101