// swapper.cpp - swaps integers two ways (Nagler exercise 4.1, p. 58) // CS 60 assignment 4, part 1, Fall 2009 // YOUR NAME, DATE #include // solution to 1.a: forward declarations for two swap functions - HERE // main is essentially verbatim from Nagler, p. 58 int main() { int first(-5), second(4); swapByPointer(&first, &second); std::cout << "First = " << first << ", Second = " << second << '\n'; swapByReference(first, second); std::cout << "First = " << first << ", Second = " << second << '\n'; } // solution to 1.b: implementations for two swap functions - BELOW