|
Has your class studied functions, yet? At any rate, after you get the starting coords maybe you could store them in float variables called X and Y.
Each time you loop though the input, you should take in a char and use a switch statement. If the char is q, cout << X, Y, or if it is a direction (N,E,S,W) read a float.
The direction itself will tell you what to do with the float. N for example means you should add that float to Y, whereas W, would mean subtract it from X.
Does that outline help enough that you could write the code now?
__________________
Stop intellectual property from infringing on me
|