Describe a strategy for writing template functions.

What will be an ideal response?


A good general strategy for writing function templates is to write an ordinary (non-template) function first. Then completely debug the ordinary function. When the debugging is complete, convert the ordinary function to a template function by replacing type names with a type parameter. The concrete case is easier to understand. There are fewer details to worry about, in particular, you do not have to be concerned about template syntax rules.

Computer Science & Information Technology

You might also like to view...

Files in the Recycle Bin can be restored or permanently deleted

Indicate whether the statement is true or false

Computer Science & Information Technology

A(n) ________ cell range consists of cells directly adjacent to one another

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Suppose you plan a user manual that will be available on the Web, but users have said that they will want to be able to print it out as well. What colors should you avoid? Why?

What will be an ideal response?

Computer Science & Information Technology

The Expert Witness Format was originally developed as a proprietary format by a company specializing in forensic tools. It has been subsequently adopted and used in other applications. What company developed EWF?

a. Microsoft b. Access Data Corporation c. Apple Computer d. Guidance Software

Computer Science & Information Technology