I usually declare (and define) my vector of vectors with the following syntax,
vector<vector<int>> graph = *new vector<vector<int>>(n, *new vector<int>(n, 0));
Here n is already defined. And this usually works fine in most compilers. But a few days ago I tried importing the source file to another system, and it was filled with compilation errors something like,
"Expected primary expression after '>>' "
I do not remember the exact errors, but do know that after adding spaces between '>' and '>' on both sides the error was removed. i.e.
vector<vector<int> > graph = *new vector<vector<int> >(n, *new vector<int>(n, 0));
I know that the syntax requires us to add spaces between both '>'s, but I would like to know if there is any difference between the compilers, because both used c++11 and even the same IDEs. I have used this syntax for very long and it would be very frustrating to edit each one. It would be easier to know which compilers it works on.