0
What did I do wrong with the declaration part ??
It says ‘i’ was not declared in this scope And ‘a’ was not declared in this scope #include <iostream> using namespace std; int main() { int a[i]={}; while(cin>>a[i]){ cout<< a[i]; } return 0; }
2 ответов
+ 4
Well, there is nowhere a variable 'i' to be found, so of course it says it is not declared. As a result, the declaration of 'a' is faulty aswell.