dhyaan's blog

By dhyaan, history, 5 years ago, In English

When I declare vector v[10] , inside the main() function like this,


#include<bits/stdc++.h> int main() { vector<int> v[10]; }

the program halts & stops responding.

But When I declare it at global, like this,

#include<bits/stdc++.h>
vector<int> v[10];
int main()
{
    //something
} 

It works fine.

Why ?

Full text and comments »

  • Vote: I like it
  • -3
  • Vote: I do not like it