CSC166 Object Oriented Programming

Object Oriented ProgrammingTU Board 2075

Create a function called swaps () that interchanges the values of the two arguments sent to it (pass these arguments by reference). Make the function into a template, so it can be used with all…

5

Create a function called swaps() that interchanges the values of the two arguments sent to it (pass these arguments by reference). Make the function into a template, so it can be used with all numerical data types (char, int, float, and so on). Write a main() program to exercise the function with several types.

A worked answer is on its wayMeanwhile, read the Object Oriented Programming notes for this topic.

Discussion

Loading…

More Object Oriented Programming questions

All Object Oriented Programming old questions