I'm getting an error with my 2nd void statement: 3 in all
warning C4518: 'void ' : storage-class or type specifier(s) unexpected here; ignored
error C2146: syntax error : missing ';' before identifier 'SetFailing'
fatal error C1004: unexpected end of file found
I made a InData file with 100 test scores so it can open it up and ge all the test scores to look at but something is still wrong...I hope I am not to far off..
Code:
#include <iostream>
#include <fstream>
using namespace std;
const int NUM_STUDS = 100;
ifstream InData;
void Initialize(bool failing[])
void SetFailing(bool failing[],const int score[])
void SetPassing(bool passing[],const int score[])
int main()
{
bool failing [NUM_STUDS];
bool passing [NUM_STUDS];
int grade;
int score [NUM_STUDS};
InData.open("InData.txt");
if (!InData.fail())
InData >> grade;
else
cout<<"Error opening file";
cout << "The number of failing is:" << failing << endl;
cout << "The number of passing is:" << passing << endl;
return 0;
}
void Initialize(bool failing[])
{
int index;
for(index=0; index<NUM_STUDS; index++)
failing[index]=false
}
void SetFailing(bool failing[],const int score[])
{
int index;
for(index=0; index<NUM_STUDS; index++)
if (score[index]<60)
failing[index]=true
}
void SetPassing(bool passing[],const int score[])
{
int index;
for(index=0; index<NUM_STUDS; index++)
if (score[index]>=60)
passing[index]=true
}