language: C++ 4.7.2 (gcc-4.7.2)
date: 286 days 23 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
using namespace std;
 
void x(int y[10])
{
        cout << y << endl;
        cout << &y << endl;
}
 
int main() {
        int a[10];
        cout << a << endl;
        cout << &a << endl;
        cout << &a[0] << endl << endl;
 
        x(a);
        cout << endl;
        x(&a);
 
        return 0;
}
prog.cpp: In function ‘int main()’:
prog.cpp:18: error: cannot convert ‘int (*)[10]’ to ‘int*’ for argument ‘1’ to ‘void x(int*)’