Hi I am compilinig a C++ solution in VS2008.
ostringstream strout;
I am getting the compilation error "error C2065: 'ostringstream' : undeclared identifier".
I feel I have included all the necessary header files.
Can anyone kindly let me know how to fix this error (What all header files to include) ?
Also I am getting a strange error like "error C2146: syntax error : missing ';' before identifier 'strout'" at the same line.
Whereas I know that I havent missed ";" semi-colon @ the line whre the error is being thrown.
Thanks IN advance.
You need to
and qualify the name
std::ostringstream
.We can't tell you what's wrong with your code for sure, unless you show it to us.
But you can use the following and an example on how to do it:
The most likely cause is that you haven't actually included all the needed header files which is why it wouldn't recognise
ostringstream
.And it's that lack of recognition that's probably causing the missing semicolon error.