Saturday, December 4, 2010

Vectors of Vectors

The following does not compile:
    #include <vector>
    std::vector<std::vector<int>> vectorOfVectorsOfInts;

This is because there is no space between the ">>". ">>" looks like the stream extraction operator to the compiler. In the next version of

C++ tentatively called C++09), no space between the ">"s is supposed to be allowed.

No comments:

Post a Comment