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 / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is operators in c++?

971


Define a pdb file.

1036


how can i access a direct (absolute, not the offset) memory address? here is what i tried: wrote a program that ask's for an address from the user, creates a FAR pointer to that adress and shows it. then the user can increment/decrement the value in that address by pressing p(inc+) and m(dec-). NOW, i compiled that program and opened it twice (in 2 different windows) and gave twice the same address to it. now look what happen - if i change the value in one "window" of the program, it DOES NOT change in the other! even if they point to the same address in the memory! here is the code snippet: //------------------------------------------------------ #include //INCLUDE EVERY KNOWN HEADER FILE #include //FOR ANY CASE... #include #include #include main() { int far *ptr; //FAR POINTER!!! long address; char key=0; //A KEY FROM THE KEYBOARD int temp=0; clrscr(); cout<<"Enter Address:"; cin>>hex>>address; //GETS THE ADDRESS clrscr(); (long)ptr=address; temp=*ptr; //PUTS THE ADDRESS IN THE PTR cout<<"["<

2386


How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?

1050


What is the difference between prefix and postfix versions of operator++()?

1047


Which ide is best for c++?

1014


Is c++ free?

1059


In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that

1058


What is the use of bit fields in structure declaration?

944


Which is not a valid keyword a) public b) protected c) guarded

1214


Explain dangling pointer.

1088


Carry out conversion of one object of user-defined type to another?

1006


What is c++ array?

1052


What does the linker do?

996


What is the object serialization?

1110