I there a compiler option I could use in CC compiler to get the following code (which compiles fine in Visual C++)
std::vector<std::vector<double>> v2;
without the following error
Error: "," expected instead of ">>"
I there a compiler option I could use in CC compiler to get the following code (which compiles fine in Visual C++)
std::vector<std::vector<double>> v2;
without the following error
Error: "," expected instead of ">>"
Try this :
std::vector<std::vector<double> > v2; //give a space between two '>'
">>
" is interpreted as the right shift operator and hence you get a compile time error.
This problem will be fixed in C++0x. Have a look here .
You need a space between the two greater-than signs:
std::vector<std::vector<double> > v2;
Otherwise, the ">>" is treated as a single token.
std::vector<std::vector<double> > v2;
You need to add a space, other wise it will be interpreted as >> operator.