Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solaris C++ stream input >> operator and templates of templates

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 ">>"

like image 680
Steve Avatar asked Nov 28 '22 20:11

Steve


1 Answers

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 .

like image 170
Abdullah Nehir Avatar answered Dec 05 '22 20:12

Abdullah Nehir