Ah well, I started on the next project today, which I should have done rather soon since I can reuse a lot of the code from the previous project, just implementing a different data structure. Today I coded up a small parser that I was happy with to sort of tokenize a string into its various parts.
Given a string with the following format:
the function returns each part. It seems to me that there would be ways already implemented to do this sort of thing with strings, but I haven't found it. It was a nice exercise at least. I'm sure it's not the most efficient, but it's easy to use and gets the job done. If you can use it, by all means, have at it.
string getToken(string& initial, char delim)
string temp = "";
int length = (int)initial.size();
for(int i=0; i
temp += initial.at(i);
if(initial.at(i) == delim)