getting not declared in this scope error

im getting this error on compile:: nScores not declared in this scope
please help me!!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//average- averages a set of scores entered
//         by user using a aray
//
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
    int display_aray (nScores [100])

    {
    int ncount;
    for (ncount=0;int nScores[ncount]>=0;ncount++)
{
    cout.width(3);
    cout<<i<<" - "<<nScores[ncount]<<endl;
}
    }
    break;
}
    int ( nScores)
{
    for (int n=0;nScores [n]=>0; n++)
{
    cout <<"enter score:"<<endl;
    cin >>nScores [n];
}
    return n,nScores[];
}

int main (int nNumberofArgs, char* pszArgs [])
{
//tell the user what the program does and how to use it
    cout <<"this program averages a set of scores entered by user '\n'"<<
           " to finnish entering the scores enter a negative number"<<endl;
    int nScores[100];
    int (int nScores[])
    for (int nAccumulater=0,int nCount=0;nScores[nAccumulater]=>0;nCount++)
{
    nAccumulater+=nScores[nCount];
}
    int average;
    average=nAccumulater/n;
    cout <<"input terminated '\n' input data:'\n'"<<endl;
    int display_aray (int nScores [100])
    cout <<"the average is:'\n'"<<average<<endl;
    return 0;
}


note: im a real newbie to this stuff so if you could please
explain very simply and explain why i would be really appreciative
thanks in advance!
the errors are like this
C:\Beginning_Programing-CPP\averages\main.cpp|9|error: 'nScores' was not declared in this scope|
C:\Beginning_Programing-CPP\averages\main.cpp|11|error: expected ',' or ';' before '{' token|
||=== Build finished: 2 errors, 0 warnings ===|
Last edited on
try remove the "int" in line:

for (ncount=0;int nScores[ncount]>=0;ncount++)
Topic archived. No new replies allowed.