Could someone help me with this primary expression compiler error?
proj7.cpp:52: error: expected primary-expression before ';' token
admiral% vi proj7.cpp
"proj7.cpp" 55 lines, 1180 characters
// finding the sum of #s in a file.
#include <iostream>
#include <iomanip>
#include <fstream>
using namespace std;
int main()
{
const int size = 15;
int score[size];
int count = 0;
ifstream inFile;
// open file
inFile.open("p6.dat");
while (count < size && inFile >> score[count]);
count++;
// averages per student
int total = 0;
double average = 0, average1 = 0, average2 = 0, average3 = 0, average4 = 0, three = 3;
cout << fixed << showpoint << setprecision(2);
for (count = 0; count < three; count++)
{total += score[count];
average = total / three;}
cout << average << " " <<;
for (count; count < 3; count++)
total += score[count + 6];
average2 = total / 3;
cout << average2 << " " <<;
for (count; count < 3; count++)
total += score[count + 9];
average3 = total / 3 ;
cout << average3 << " " <<;
for (count; count < 3; count++)
total += score[count + 12];
average4 = total / 3;
cout << average4 << " " <<;
return 0;
}
these are the chunks causing the problems:
for (count = 0; count < three; count++)
{total += score[count];
average = total / three;}
cout << average << " " <<;