// ***************************************************************** // Author: Zhixiang Chen // Class: CSCI/CMPE 1170, Spring 2009 // Lab 27: Header file for Lab 27 // Date: January 12, 2009 // Comment: The code here is meant to be revised. // ***************************************************************** #include #include #include #include using namespace std; #ifndef LAB_27_HEAD_H #define LAB_27_HEAD_H //define studentType structure struct studentType { string firstName, //firstnames for students lastName; //last names for students char grade; //letter grades }; //swapOne takes two pointer type parameters void swapOne(int * x, int * y) { //watch carefully how we do the swaping. Compare this with swapTwo int temp; temp = *x; *x = *y; *y = temp; } //swapTwo takes two reference type parameters void swapTwo(int & x, int & y) { //watch carefully how we do the swaping. Compare this with swapOne int temp; temp = x; x = y; y = temp; } //swapOne takes two pointer type parameters void swapThree(int x, int y) { //watch carefully how we do the swaping int temp; temp = x; x = y; y = temp; } #endif