// ***************************************************************** // Author: Zhixiang Chen // Class: CSCI/CMPE 1170, Spring 2009 // Lab 19: Array parametrs to functions // and file processing // Date: January 12, 2009 // Comment: The code here is meant to be revised. // //----------------------------------------------------------------- // // This lab exercise is to show how array parameters to functions work and // how to process a file. The work is as follows: Write a program to statistical // information of all letters occurred in file "lab_19_data.txt", that is, frequencies of // letters in this file. // // // Compile and run your program. When everything is fine, // print your .cpp file and turn it to me or the TA. // ***************************************************************** #include < iostream > #include #include < string > #include < cstring > #include < cmath> #include #include #include "lab_19_head.h" using namespace std; int main( ) { //define a const array size const int SIZE = 26; //array declaration int stats[SIZE]; //letter stat array //file var ifstream inFile; //input file int i; //loop var //open file inFile.open("lab_19_data.txt"); if(!inFile) { cout<<"Fail to open lab_19_data.txt, and stop ."<