In which condition a template a better solution than a base , C/C++ Programming

In which condition a template a better solution than a base class?

A: While you are designing a generic class to contain or manage objects of other types, while the format & behavior of those other types are not important to their containment or management, and specifically while those other types are unknown (therefore, the generality) to the designer of the manager or container class.

 

Posted Date: 3/16/2013 2:52:34 AM | Location : United States







Related Discussions:- In which condition a template a better solution than a base , Assignment Help, Ask Question on In which condition a template a better solution than a base , Get Answer, Expert's Help, In which condition a template a better solution than a base Discussions

Write discussion on In which condition a template a better solution than a base
Your posts are moderated
Related Questions
Pebble Merchant Problem Description There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides


if one won't explicitly call the destructor of a local; then how does he handle the above situation?

Many human diseases could be controlled by the knowledge of the gene’s structure and pattern. The human gene could be represented by four nucleotides. Each nucleotide is represente

F r i e n dly Function: A class can have public members and private members.   The public member can be used through the class using dot operator.   Where as private me

To store a date use a structure that contains three members date, month and year. If the dates are equal then display message “Equal” otherwise “Unequal” Program structure: main()

How do you know that your class requires a virtual destructor? A: If at least your class has one virtual function, you must make a destructor for this class virtual. It will let

Is it legal for a member function to say delete this? A: As long as you're cautious, it's OK for an object to delete this. Here's how I define "cautious": You have to be a

B-tree: A B-tree is an also called balanced m-way tree. A node of the tree may have many records or key and pointers to children. It is also called as the balanced sort tree. It s

1. The management of a company would like to determine the median annual salary of its employees.Write a pascal program that display the number of employees and their median salary