Answer the following questions true (T) or false (F)

1. In implementing class template member functions, the functions are themselves templates.

2. In the implementation of a class template function, the class name before the scope resolution operator is just the class name, with no additional syntax.


1. True
Explanation: The functions require definition with template prefix as do any other function template.
2. False
Explanation: If the template class name is Pair, the class name before the scope resolution operator must be Pair, not just Pair. If only Pair is used, without the , there will be no function instance generated, causing hard to understand error messages.

Computer Science & Information Technology

You might also like to view...

A ScreenTip displays the slide number and the number of slides in the presentation

Indicate whether the statement is true or false

Computer Science & Information Technology

____ and segmentation can provide a way of managing main memory.

A. Sectoring B. Clustering C. Paging D. Partitioning

Computer Science & Information Technology

Templates can have a variable number of slide layouts depending upon the complexity of the presentation._________________________

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The most common type of database used with personal computers today is a ____.

A. relational database B. two-way database C. one-dimensional database D. concurrent database

Computer Science & Information Technology