Calculating strongly connected components using  Kosaraju's algorithm C++