#include #include //for istringstream #include using namespace std; int main(int argc, char **argv) { istringstream ist("size 38L"); string word; int i; char c; ist >> word >> i >> c; if (!ist) { cerr << argv[0] << ": the istringstream failed\n"; return EXIT_FAILURE; } cout << "word == \"" << word << "\"\n" << "i == " << i << "\n" << "c == '" << c << "'\n"; return EXIT_SUCCESS; }