Computer Science - Object Oriented Programming Using C++ - Discussion

Discussion Forum : Object Oriented Programming Using C++ - Section 1 (Q.No. 28)
28.
The type to be used in an instantiation of a class template follows ________
the generic class name
the keyword template
the keyword class
the template definition
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
3 comments Page 1 of 1.

Ayesha. said:   5 years ago
Class template instantiation.

A class template by itself is not a type, or an object, or any other entity. No code is generated from a source file that contains only template definitions. In order for any code to appear, a template must be instantiated: the template arguments must be provided so that the compiler can generate an actual class (or function, from a function template).

Explicit instantiation
template class name < argument-list > ; (1)

AADY said:   1 decade ago
Templates are a way of making your classes more abstract by letting you define the behavior of the class without actually knowing what datatype will be handled by the operations of the class. In essence, this is what is known as generic programming; this term is a useful way to think about templates because it helps remind the programmer that a templated class does not depend on the datatype (or types) it deals with.

Evangelin said:   1 decade ago
What is generic class?

Post your comments here:

Your comments will be displayed after verification.