capturing commands at prompt
i am having no luck at all!!
i am trying to prompt the user to enter commands at a prompt and capture what is entered in to a vector of strings
the user can enter any number of whitespaces before or in his input
enter command: (5 spaces) buy (3 spaces) 1000 bushels(2 spaces) corn 3.00
so i am trying to get 'buy' into the vector at pos[0]
'1000' in pos [1]
'bushels' in pos[2]
'corn' pos[3] and so on and so on
i know i can capture the entire line with getline(cin, string);
i know i can get 'buy' by converting string to a stream (iss) and using iss >> cmd;
but the string entered can have any number of words
is there a simpler method which will enable me to do what i want??
Thanks in advance