10.19.05 CISC181 Friday Last time: (0) Arrays: finding the min of an array (a) We modified findMax to do findMin (b) We modified findMin to find the location of the min (c) We talked about two unsuccessful ways of doing a swap: void swap(int a, int b) { a = b; b = a; return; } void swap(int a, int b) { int temp; temp = a; a = b; b = temp; return; } We talked about why both are unsuccessful, then very briefly mentioned that this technique WILL be successful: void swap(int &a, int &b) { int temp; temp = a; a = b; b = temp; return; } NEXT TIME: More on reference parameters, aliases, and the various uses of the & in various contexts.