// ***************************************************************** // Author: Zhixiang Chen // Class: CSCI 1380.01, Summer I, 2008 // Lab 27: Array parametrs to functions // Date: June 23, 2008 // Comment: The code here is meant to be revised. // ***************************************************************** #include #include using namespace std; #ifndef LAB_OPTIONAL_3_HEAD_H #define LAB_OPTIONAL_3_HEAD_H //get numbers void getNumber(int x[ ], const int s) //array parameter is a reference parameter so that changes made to the //to it in the function will be kept { for (int i=0; i "; cin >> x[i]; } return; } //show numbers void showNumbers(const int x[ ], const int s)//array parameter is of value type so that it's elements //cannot be changes in the function { for (int i=0; i "; cin.get(c[i]); } } #endif