Have you considered a stringstream?
String streams inherit from istream so for the arguments that are
space separated, you could use the simple >> operator. The
disadvantage being that there's no string::find() to find the dot
between two dot separated inputs, but you could write your own.
stringstream::getline() could help you after you know where to
separate them.
Or, by using a string, there's string::find(). You'd have to work out
how to find the last dot for your sequence of dots, though.
Or, you could always use a combination of strings and a stringstream.
Use the stringstream to put all the space separated stuff into
separate strings, then use the string::find_last_of() to easily
separate everything into its final arguments.
Lots of fun tools to play with, no?
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


|