string str;
stringstream buffer;
buffer << is.rdbuf();
str = buffer.str();
cout << str.length();
size_t pos = str.find_first_not_of(".123456789");
Can someone please explain to me why this code doesn’t work?
When I run it, it just sits there after I enter “12345”
What on earth is going on?! I’m not too familiar with stringstreams but why wouldn’t this, and other seemingly mundane operations work as expected?
Maybe this is what you are looking for: