#include #include using namespace std; int main(int number_of_arguments, char **arguments) { //Create a string with a bunch of number separated by spaces. string s = "103.23 53.29 91.23 88.15 77.77"; //make a stringstream from the string stringstream ss(s); //while there are more things to read from the stream, repeat while (ss.good()) { //we want to convert each thing in the string to a double double next_value; ss >> next_value; //print out the value we got from the stream cout << next_value << endl; } }