Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - No stringstream?: (3 Items)
   
No stringstream?  
I have code that goes like this:

#include <sstream>
#include <iostream>

Cartesian Cartesian::BuildFromString(const char* specString)
{
std::stringstream myStream(specString);
.
.
.
}

This fails to compile with the error, " 'stringstream' undeclared in namespace 'std' .


What's the problem here?

I see other posts on qnx.com to the effect that others are using std::stringstream with no problem, so why doesn't it 
work for ME?
Re: No stringstream?  
Does this compile?

#include <string>
#include <sstream>
int main() {
    std::string str = "string";
    std::stringstream myStream(str);
    return 0;
}

If not post your command line to compile

Chris Chiesa wrote:
> I have code that goes like this:
>
> #include <sstream>
> #include <iostream>
>
> Cartesian Cartesian::BuildFromString(const char* specString)
> {
> std::stringstream myStream(specString);
> .
> .
> .
> }
>
> This fails to compile with the error, " 'stringstream' undeclared in namespace 'std' .
>
>
> What's the problem here?
>
> I see other posts on qnx.com to the effect that others are using std::stringstream with no problem, so why doesn't it 
work for ME?
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post53225
>
>   
Re: No stringstream?  
Chris Chiesa wrote:
> I have code that goes like this:
> 
> #include <sstream>
> #include <iostream>
> 
> Cartesian Cartesian::BuildFromString(const char* specString)
> {
> std::stringstream myStream(specString);
> .
> .
> .
> }
> 
> This fails to compile with the error, " 'stringstream' undeclared in namespace 'std' .
> 
> 
> What's the problem here?
> 
> I see other posts on qnx.com to the effect that others are using std::stringstream with no problem, so why doesn't it 
work for ME?

Hi Chris,

It sounds like you're using the embedded or abridged C++ library. I 
believe stringstream is only in the full C++ library.

Regards,

Ryan Mansfield