how to separate integer and char

Hello all
i have a problem to separate integer and char.

for example:
i walk from (0,0) to 5S 3W 6E 1N 4W 3N 7S
S: South
W: West
E: East
N: North

i use array to save one by one like this:
input: 5S 3W 6E 1N 4W 3N 7S
index: 0 1 2 3 4 5 6

so, i have to read integer and char in same time. how to separate it?

Why not input it in a string then use the member function: find_first_of() -- in the string header file, with loops, and so-on...

Topic archived. No new replies allowed.