dhyaan's blog

By dhyaan, history, 2 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,

vector<int> v[10];
int main()

It works fine.

Why ?

Read more »

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