prog.cpp: In function ‘int main()’:
prog.cpp:7:19: error: ‘i’ was not declared in this scope
printf("%d ", a[i]);
^
prog.cpp:21:2: error: ‘system’ was not declared in this scope
system("pause");
^~~~~~
prog.cpp:21:2: note: suggested alternative: ‘sys_nerr’
system("pause");
^~~~~~
sys_nerr