Hey, I've looked all over and can't seem to find a thread relevant to my issue that has explanations I can understand. I created an array in my main call program StartProg() and I can't seem to figure out how to send it to a new function GetStudentScore().
1 2 3 4 5 6 7 8 9 10 11 12
void StartProg() {
int examScores[3];
int returnScore = GetExamScores(examScores[3]);
}
int GetExamScores(examScores[3])
{
/* code */
return intVar;
}
Then in my .h I have:
1 2
void StartProg();
int GetExamScores(int[]);
Is there something I am doing wrong? I have these related errors:
Error 1 error C2664: 'GetExamScores' : cannot convert parameter 1 from 'int' to 'int []' c:\users\watus_000\documents\my box files\documents\school\_cs1410\proj_02\proj_02\proj_02.cpp 23 1 Proj_02
2 IntelliSense: argument of type "int" is incompatible with parameter of type "int *" c:\Users\watus_000\Documents\My Box Files\Documents\School\_CS1410\Proj_02\Proj_02\Proj_02.cpp 22 34 Proj_02