Hello once again,

I had posted a message earlier on here tonight (which is where the requirements for my program are), and did get some help from Zen (thanks)...but now I'm running into all kinds of binary errors. This program worked when I just had arrays, but since modifying it for this latest project, I can't seem to figure it out.#include <iostream.h>
#include <iostream.h>
#include <fstream.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>

const int smax = 21;
const int tsize = 3;
const int nsize = 20; //check

struct STU
{
char name[30]; //check
int code;
double hours;
double gpa;
} ;

int stu_info(STU [] [tsize]);
void stats_hours(STU [] [tsize], int);
double stats_gpa(STU [] [tsize], int);
void best_stus(STU [] [tsize], int, double);

int main(void)
{
STU student[smax] [tsize];

cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(1);

int stucount;
double avg_gpa;

stucount = stu_info(student);
stats_hours(student, stucount);
avg_gpa = stats_gpa(student, stucount);
best_stus(student, stucount, avg_gpa);

return 0;

}

int stu_info(STU student[] [tsize])
{

ifstream file1, file2;
char file1_disk[nsize] = "student.dat";
char file2_disk[nsize] = "stuname.dat";

int stucount;
stucount = 0;
int next = 0;

file1.open (file1_disk);

if (file1.fail())
{
cout << file1_disk << " is not available";
exit(1);
}

file2.open (file2_disk);
if (file2.fail())
{
cout << file2_disk << " is not available";
exit(1);
}

do
{
if (stucount < 20)
{
cout << "Enter Student Code (100-999): ";
cin >> student[next][next].code;
if (( student[next][next].code > -1 && student[next][next].code < 100) || (student[next][next].code > 999))
{
cout << "\n\nCODE MUST BE 100-999!";
}
else if (student[next][next].code > -1)
{
for (int k = 0; k < smax; ++k)
{
file1 >> student[k][next].code >> student[k][next].gpa;
file2.getline (student[k][next].name, nsize);
file2 >> ws;

}

file1.close();
file2.close();

cout <<"\n\tEnter Hours Completed: ";
cin >> student[next][next].hours;
cout << "\n\tCurrent G.P.A: ";
cin >> student[next][next].gpa;
student [stucount] [0] = student[next][next].code;
student [stucount] [1] = student[next][next].hours;
student [stucount] [2] = student[next][next].gpa;
++next;
++stucount;


}
}
else
{
cout <<"\n\nMAXIMUM CLASS SIZE IS 20!!";
student[next][next].code = -1;
}

++next;
} while (student[next][next].code > -1);

return stucount;

}
void stats_hours(STU student[] [tsize], int count)
{
double tot, avg, hihour;
int x, y;
tot = 0;
hihour = 0;

for (x = 0; x < count; ++x)
{
tot = tot + student [x] [1];
if (student [x] [1] > hihour)
{
hihour = student [x] [1];
}
}
avg = tot / count;
cout << "\n\n\nThe Average Numbers of Hours for this Class is: "
<< avg;

for (y = 0; y < count; ++y)
{
if (student [y] [1] == hihour)
{
cout << "\nStudent " << student [y] [0]
<< " has the highest number of hours completed: "
<< student [y] [1] << " hours";
}
}
return;



}

double stats_gpa(STU student [] [tsize], int count)
{
int x, y;
double higpa, logpa, tot, avg;
int passcount;
higpa = tot = 0;
passcount = 0;
logpa = 5.0;
for (x = 0; x < count; ++x)
{
if (student[x] [2] > higpa)
{
higpa = student[x] [2];
}
if (student[x] [2] < logpa)
{
logpa = student[x] [2];
}
if (student[x] [2] >= 2.0)
{

++passcount;
}
tot = tot + student[x] [2];
}
cout << "\n\n";
for (y =0; y < count; ++y)
{
if (student[y] [2] == higpa)
{
cout << "\nStudent " << student [y] [0]
<< " had the highest GPA of: "
<< student[y] [2];
}
}
for (y=0; y < count; ++y)
{
if (student [y] [2] == logpa)
{
cout << "\nStudent " << student [y] [0]
<< " had the lowest GPA of: "
<< student [y] [2];
}
}
cout << "\n";
cout << passcount << " students are passing(GPA of 2.0 or higher)";
avg = tot / count;

return avg;
}

void best_stus(STU student [] [tsize], int count, double avg_gpa)
{
int i;
cout << "\n\n\n";
for (i=0; i < count; ++i)
{
if (student [i] [2] > avg_gpa)
{
cout << "Student " << student [i] [0]
<< " Exceeded the average GPA of "
<< avg_gpa << ", with a GPA of "
<< student [i] [2] << "\n";
}
}
return;

}

ERROR MESSAGES:

error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'int' (or there is no acceptable conversion)
c:\c++ files\tshw7.cpp(108) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'double' (or there is no acceptable conversion)
c:\c++ files\tshw7.cpp(109) : error C2679: binary '=' : no operator defined which takes a right-hand operand of

NOT ALL OF THEM...but you probably get the point

I BEG of someone to help me out and let me know what I'm doing wrong!! Thanks again to all who took some time for my pathetic programming