c++ - Segmentation fault (core dumped) for vector declaration -


i want know why behavior occuring?

if declare vector< pair<int,int> > graph[1000050]; outside of main() program not give error, if declare inside main() segmentation fault occurs, why?

it big stack. use vector of vectors instead.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -