In the book Accelerated C++ it is stated that if you declare a vector of vectors like this:
vector<vector<int>> foo;
it can generate errors because the >> can be misread as an operator, so you are in fact supposed to write it like this:
vector<vector<int> > foo;
However, my code that uses these structures written the first way seems to work. Is this a modern convention that I should be following?
The current version of C++ (C++11) has made the first version legal. Some compilers have always accepted it (technically in error against C++03). The second version is safer and more widely compatible.