prog.cpp: In function ‘int main()’:
prog.cpp:8:18: error: expected unqualified-id before ‘int’
int scores[51], int newscore, int maxlen;
^~~
prog.cpp:10:26: error: assigning to an array from an initializer list
scores = {66, 54, 23, 12};
^
prog.cpp:11:2: error: ‘newscore’ was not declared in this scope
newscore = 45;
^~~~~~~~
prog.cpp:12:2: error: ‘maxlen’ was not declared in this scope
maxlen=51;
^~~~~~
prog.cpp:14:49: error: ‘getRank’ was not declared in this scope
printf("%d\n", getRank(scores, newscore, maxlen));
^
prog.cpp: In function ‘double getRank(int*, int, int)’:
prog.cpp:20:36: warning: ‘sizeof’ on array function parameter ‘scores’ will return size of ‘int*’ [-Wsizeof-array-argument]
int scoresLength = sizeof(scores)/sizeof(scores[0]);
^
prog.cpp:18:27: note: declared here
double getRank(int scores[], int newscore, int maxlen) {
^
prog.cpp:22:8: error: ‘i’ was not declared in this scope
for(i=0;i<scoresLength;i++){
^