operator overload

Oct 25, 2015 at 3:36am
I'm trying to read a list from the standard input in the format [x,y,dx,dy].
Not really good with the operator overloading and how to use it. Actually not even sure if I should use it in this case.
Any ideas?
Oct 25, 2015 at 4:20am
closed account (48T7M4Gy)
typing in (ie std input) "[x,y,dx,dy]" in response to cin seems to me to be a very unusual way of entering data.

But if you insist, treat it as a single string and parse the string. Operating overloading could be applied but seems to be an unnecessary complication.
Last edited on Oct 25, 2015 at 4:20am
Topic archived. No new replies allowed.