Try the following:
std::vector<std::vector<double> > v2; //give a space between two '>'
" >> " is interpreted as the right shift operator, and therefore you get a compile-time error.
This issue will be fixed in C ++ 0x. Take a look here .
source share