Need little help

I got some errors. Sound that something is wrong.

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
#include <iostream>
using namespace std;

double avgArray(int []);

int main()
{
    const int SIZE = 10;
    int userNums[SIZE];
    
    cout << "Enter 10 numbers: ";
    for (int count = 0; count < SIZE; count++)
    {
        cout << "#" << (count + 1) << " ";
        cin >> userNums[count];
        }
        cout << "The average of those numbers is ";
        cout << avgArray(userNums, SIZE) << endl;
        
       	system("PAUSE");
        return 0;
}

double avgArray(int arr[])
{
    double total = 0.0, average;
    for (int count = 0; count < 10; count++)
    total += arr[count];
    average = total / 10;
    	
	return average;
}

---------------------------------------------------------------------
4 too many arguments to function `double avgArray(int*)'
18 at this point in file
closed account (Dy7SLyTq)
when you call avgArray at line 18, remove ", SIZE"
Oh, yeah. It worked. Thanks.
Topic archived. No new replies allowed.