Advertisement
std::vector<std::vector<int>> thematrix;
- There’s nothing wrong with it.
- An std::vector cannot contain more std::vector containers as its elements.
- The correct syntax should be: std::vector[std::vector[int]] thematrix;
- >> is parsed as the shift-right operator, and thus results in a compile error.
Join our list
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.