Line 49 is giving me a C2679 error and I'm not sure how to fix it. Help?
#include <iostream>
#include <fstream>
using std::cout;
using std::cin;
using std::ifstream;
using std::ofstream;
const int MAX_SSN = 12;
const int MAX_WAGE = 6;
const int MAX_HOURS = 3;
const char STATUS = 1;
int ReadData ( int ssn[] [MAX_SSN], int wage[] [MAX_WAGE], int hours[] [MAX_HOURS], char status[] [STATUS] );
int main ()
{
int ssn[11][MAX_SSN];
int wage[11][MAX_WAGE];
int hours[11][MAX_HOURS];
char status[11][STATUS];
return 0;
}
int ReadData ( int ssn[] [MAX_SSN], int wage[] [MAX_WAGE], int hours[] [MAX_HOURS], char status[] [STATUS] )
{
int num_records = 0;
//open file
ifstream data_file( "PE11_1.txt" );
//check to see if file is open
if ( data_file.is_open() )
{
//read until end of file
while ( !data_file.eof() )
{
num_records++;
data_file >> ssn [num_records] //this is where i get the c2679 error
>> wage [num_records]
>> hours [num_records]
>> status [num_records];
}
data_file.close();
}
else
{
cout << "Error. Unable to open data file." <<'\n';
}
return num_records;
}