Several answers (like splitting int from a string) are proposing
#include <sstream>
Unforunately, doesn't compile for me (error "sstream: No such file or directory"). I found I can use
#include <strstream>
instead. Ok, now, with
std::string s = "100 123 42";
std::istringstream is( s );
I got "undeclared variable `istringstream' (first use here)". Ok, trying out:
std::istrstream is(s);
Almost ok. Error: "no matching function for call to `istrstream::istrstream (string &)'". But at least it compiles with:
std::istrstream is();
So I feel I'm somewhere near:) What's missing?