Why might you choose to use a function template instead of a macro?

What will be an ideal response?


A macro is a text substitution done by the preprocessor. Macros can have serious side effects and do not enable the compiler to perform type checking. Function templates provide a compact solution, like macros, but enable full type checking.

Computer Science & Information Technology

You might also like to view...

Loops intended to read and process a series of values are called ____ loops.

A. output B. read C. write D. input

Computer Science & Information Technology

A component is a prebuilt movie clip installed with Flash that includes a set of ____ components.

A. user interface B. video C. both a. and b. D. neither a. nor b.

Computer Science & Information Technology

Which is NOT true concerning forms?

A) They are used for data entry. B) They can show one or multiple records at a time. C) Every table must have at least one form. D) They can be used to control access to the database.

Computer Science & Information Technology

What file extension is used for chart templates?

A) .xlsx B) .crtx C) .xltx D) .xmlx

Computer Science & Information Technology