Why does trying to find an array index using a function fail?
===

This doesn't work. Can anyone tell why?


    #include <iostream>
    
    using namespace std;
    
    int mean( int );
    
    int main() {
    
        int array[] = {43, 5, 3, 5, 2};
    
        cout << mean(array);
    
    }
    
    int mean( int list[] ) {
        return list[0];
    }

These are the errors I'm getting:

    Invalid conversion from 'int*' to 'int'
    Initializing argument 1 of 'int mean(int)'