#include <iostream> using namespace std; int main() { int i; int a[5]; for ( i = 0; i < 5; i++) { a[]=i; } for (int i = 0; i < 5; i++) { cout << a[] << endl; } }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:12:5: error: expected primary-expression before ‘]’ token a[]=i; ^ prog.cpp:16:13: error: expected primary-expression before ‘]’ token cout << a[] << endl; ^
Standard output is empty