Templates
Templates. Consider the following function, which swaps two integers: void swap(int &x, int &y) { int temp = x; x = y; y = temp; } int i = 3, j = 4; swap(i, j);. void swap(int &x, int &y) { int temp = x; x = y; y = temp; }
499 views • 38 slides