...

/

Exercise 2: Swapping Values

Exercise 2: Swapping Values

Generalize the function for swapping two values using templates.

Problem statement

In the code widget below, two functions named swap_values are declared—one for swapping int values and the other for double values. ...