Author
anonymous
about 10 years ago
Language
Compiler
Options
Author
anonymous
about 10 years ago
$
prog.cc:6:1: error: function cannot return array type 'int [5]'
auto func() -> int [5]
^
prog.cc:8:12: error: excess elements in scalar initializer
return {4, 56, 78, 4, 0};
^
prog.cc:13:19: error: subscripted value is not an array, pointer, or vector
cout << func()[2] << endl;
~~~~~~^~
3 errors generated.
Exit Code:
1