All IT and Non IT Interview Questions, MCQs, Online Quiz Questions, Engineering VIVA Questions
Sunday, 15 April 2012
How can you say that a template is better than a base class? | C++
In case of designing a generic data type to manage objects of other data types which are unknown to their container class, a template is preferred over a base class. A template can contain more than one data type parameter, making it possible to build parameterized data types of considerable complexity. The class template also allows the declaration of more than one object in the same program.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment