fork download
  1. #include<iostream>
  2. #include<vector>
  3. using namespace std;
  4. int n=6;
  5.  
  6. int visited[n]={0};
  7.  
  8. int main()
  9. {
  10. cout<<visited[0];
  11. }
Compilation error #stdin compilation error #stdout 0s 4272KB
stdin
Standard input is empty
compilation info
prog.cpp:6:14: error: array bound is not an integer constant before ‘]’ token
 int visited[n]={0};
              ^
prog.cpp: In function ‘int main()’:
prog.cpp:10:8: error: ‘visited’ was not declared in this scope
  cout<<visited[0];
        ^~~~~~~
stdout
Standard output is empty