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

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

What does stl mean in slang?

1114


What two types of containers does the stl provide?

985


What is stl stand for?

1230


What is stl in oop?

1210


What is a standard template library (stl)?

1120


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

2842


sir please send me bpcl previous question papers

2393


Can we use stl in coding interviews?

1809


How is stl different from c++ standard library?

1322


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

2443


How stl is different from the c++ standard library?

1218


draw a flowchart that accepts two numbers and checks if the first is divisible by the second.

3372


how to use C++?

2545


Who created stl?

1162


Is there any error below, its a code to delete all entires from a map #include #include iostream.h int main() { int i =0; map TestMap; while(i<3) { TesMap.insert(TestMap::value_type(i,Test)); i++; } typedef map :: iterator mapIter =TestMap.begin(); if(mapIter!=TestMap.end()) { TestMap.erase(mapItrer); ++mapIter; } return 0; }

2387