Again I am having trouble compiling this program. it is just the input codes only. These are the codes that are causing the errors.
CODE
char* name[MAX_COUNT_STUDENT];
int exam_1[MAX_COUNT_STUDENT];
int exam_2[MAX_COUNT_STUDENT];
int HomeWork[MAX_COUNT_STUDENT];
int Final_Exam[MAX_COUNT_STUDENT];
I get the same 3 errors for all 5 lines when compiling. the errors are;
error C2057: expected constant expression
error C2466: cannot allocate an array of constant size 0
error C2133: 'Final_Exam' : unknown size
This is the complete code:
CODE
#include <iostream>
#include <string>
using namespace std;
int main()
{
int i=0, MAX_COUNT_STUDENT = 3;
char* name[MAX_COUNT_STUDENT];
int exam_1[MAX_COUNT_STUDENT];
int exam_2[MAX_COUNT_STUDENT];
int HomeWork[MAX_COUNT_STUDENT];
int Final_Exam[MAX_COUNT_STUDENT];
for(i=0; i < 3; i++)
{
for (i=0; i < MAX_COUNT_STUDENT; i++)
cout << "Enter Student Name: ";
cin >> name[i];
cout << "\nEnter Exam_1_Grade: ";
cin >> exam_1[i];
cout << "\nEnter Exam_2_Grade: ";
cin >> exam_2[i];
cout << "\nEnter HomeWork_Avg: ";
cin >> HomeWork[i];
cout << "\nEnter Final_Exam_Grade: ";
cin >> Final_Exam[i];
}
return 0;
}