Hey everyone, my lecturer recently posed a very strange requirements for one of our codes. Basically its just a simple circle-drawing code which draws a circle based on the user's input (radius). However what he wants this time is that the input being able to read addition/subtractions/multiplication/division directly from the input.
Example: If a user enters the input "25+25" my code will return an error as its an incorrect input.
What my lecturer wants: If a user enters "25+25" as input, the program will read it as 50 and displays a circle of radius=50.
Is it even possible in C++ ? As far as I know, this isn't possible in C++, and the user must input twice if he wants to perform addition of inputs.
Hope someone is able to clear this up. Thanks in advance.
@Necip
Wow really didn't expect such a thing to be possible, this just goes to show my ignorance. Will definitely be working on this over the weekend. Thanks a lot !!