Simple parsing & identifying token

I'm a novice to the C++ platform.

For my class assignment I need a solution of "Parsing token" method as simple as possible. In C it is very difficult to find tokens. I'm trying but can't properly use the library functions.

So I need a simple solution.


Thanks in advance.
Last edited on
As far as C goes, strtok() doesn't look too bad:
http://www.cplusplus.com/reference/clibrary/cstring/strtok/

Never used it myself, I guess you end up with a c-string with a bunch of null terminators for you to look through.

C++ Strings over a few functions that would help, possibly a subtr(), find_first_of() combo.

If you're supposed to write it yourself, it isn't particularity complicated.

But I suggest you try yourself and post your code as to what is going wrong.
Last edited on
Topic archived. No new replies allowed.