assignment for my class

Hello all!

i am trying to do an assignment for my c++ class and i have hit a brick wall. I am supposed to write a program where 6 test scores are entered into an array; then that array is passed into a function to add a 10 point curve to those test scores entered in the array. The first part was super easy but this second part is killing me. it's only week 2 of the semester so i don't think the instructor wants us to use pointers to complete the assignment. here's what i have so far:

#include <iostream>
using namespace std;

int curvedgrades(int grades[5]);

int main()
{
int grades[5];
int i;
int newgrade;

cout << "Enter the 6 test scores:\n";

for(i=0; i<6; i++)
cin >> grades[i];
cout << "\n";

newgrade = curvedgrades(grades);
cout << "Here are the grades after a 10 point curve: \n" << newgrade;

system("pause");
return 0;
}

int curvedgrades(int x[]){
return (x[]+10);
}

i get an error -- C2059: syntax error : ']' on the line I have bolded above. Anyone have any suggestions on what I am doing wrong? thanks for any help

Iterate through the array and add 10. x[] is like calling curvedgrades() with no arguments.
Also, why are the parameters different from the prototype to the definition?
it's all good...my instructor emailed me back and got me back on track...after making the adjustment, the program worked perfectly :)
Topic archived. No new replies allowed.