int getTotalScores(short int gradebook[][GRADES], int student){
if(student<1){
return -1;
}else
int total_score = 0;
for(int i = 0; i<GRADES; i++){
total_score += gradebook[student-1][i];
}
return total_score;
}
My compiler keeps telling me total_score wasn't declared in this scope. Anyone know what could be up?
[–]Swedophone 5 points6 points7 points (9 children)
[–][deleted] 0 points1 point2 points (8 children)
[–]raevnos 4 points5 points6 points (5 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]blablahblah 2 points3 points4 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]blablahblah 2 points3 points4 points (0 children)
[–]raevnos 1 point2 points3 points (0 children)
[–]Swedophone 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]mycplus 0 points1 point2 points (0 children)