c++ - Compilation error when trying to use vector -
I try to compile this code, but I get an error:
< Code> #include & lt; Sstream & gt; # Include & lt; Vector & gt; Int main () {std :: vector & lt; Std :: ostringstream & gt; V; V.reserve (100); Return 0; }The error message says something about being unable to create
ostringstream as a default when compiling with GCC or rub I actually Can not make sense of error message
Reserved () tries to make anything? Here's the code:
When calling
reserved , the vector ends With enough space for 100 elements, it means
reserved should have the possibility of copying or increasing everything.
Because the streams are non-copyable, for this reason, they can not be stored in standard containers before C ++ 11. C +11 11, currents can be transferred, they can be made to work properly in standard containers. The missing piece here is that libstdc ++ has not implemented the currently running currents. It's with Liby ++
Expect to see in this work.
Comments
Post a Comment