How can I solve this problem with arrays in C++? (Beginner level.) : I am an enthusiast programmer, but I don't know much of arrays in C++. I have found page Edabit for small challenges. I am now working on the challenge: Get arithmetic mean of the given array. Now I have code like that:
```c++
#include <iostream>
int data;
using namespace std;
int mean(int data);
int main()
{
    int data[] = { 1, 2, 3, 4 };
    cout << mean(data);
}
int mean(int data)
{
    double mean = 0;
    for (int i = 0; i < sizeof(data) / sizeof(data[0]); i++)
    {
        mean += data[i];
    }
    mean /= sizeof(data) / sizeof(data[0]);
}
```
and I am stuck. I use Visual Studio 2019 on Windows 7 Professional, and I have underlined 3 characters ( data[i], and 2x data[0]). For this x Visual Studio says 'expression must have pointer-to-object type'. (By the way, what is the advance of addresses and pointers? I haven't learned them because I thought that I will never use them.) And I have no idea what he means with this. I only know what pointer is (at least I think).

I have tried with several Stack Overflow questions, GeeksForGeeks website and a lot of other stuff. But I am stuck.

-----------------------------------------------
For this, who haven't read the whole question:

**The question:** What is wrong with the upper code, where Visual Studio 2019 says 'expression must have pointer-to-object type' (Error E0142)?

Thank you for your effort!

*P.S. 
Don't tell me the whole answer. ;) I will guess it alone, but I just can't go through this problem.*