[ create a new paste ] login | about

Link: http://codepad.org/nh43JcZ5    [ raw code | output | fork ]

C++, pasted on Jan 29:
1
2
3
4
5
6
7
extern int a[];

int main() {
  cout << (sizeof(a) / sizeof(a[0]));
}

int a[1] = {42};


Output:
1
2
3
In function 'int main()':
Line 4: error: invalid application of 'sizeof' to incomplete type 'int []' 
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: