Alright, I've started learning array recenetly and have to write a program using them. I am having problems getting started on it, the notes we received seem very unclear. Here is the link to the instructions I have to use.
http://www.cs.niu.edu/~abyrnes/csci240/pgms/240pgm7.htm
Basically I just want some pointers to get me going in the right direction. Here is what code I have so far, I'm already getting an error in main because it says buildAr is not declared.
#include <iostream>
#include <iomanip>
#include <fstream>
using namespace std;
#define ARSIZE 20
int buildAr (int [], double [], double []);
int main()
{
int zid[ARSIZE];
float pgmavg[ARSIZE];
float testavg[ARSIZE];
buildAR[zid];
buildAR[pgmavg];
buildAR[testavg];
system ("pause");
return 0;
}
/*********************************************************/
int buildAr (int [], double [], double [])
{
int num;
ifstream inFile;
inFile.open( "averages.txt" );
if ( inFile.fail() )
{
cout << "input file did not open";
exit(0);
}
int zid[0];
inFile >> num;
//while ( inFile )
}