1 2 3 4 5 6 7
extern int a[]; int main() { cout << (sizeof(a) / sizeof(a[0])); } int a[1] = {42};
1 2 3
In function 'int main()': Line 4: error: invalid application of 'sizeof' to incomplete type 'int []' compilation terminated due to -Wfatal-errors.