The input is in a text file and it being read by the code and stored in "line" by using getline. The input is just math operations.. 1*8+2 etc. Only * and +, nothing else. But the file can also contain invalid strings such as
"2 + A + 3 + C""2**3**4"
etc. It can only two integers joined by * and + . I think I can tokenize the input and then check it against the requirement, correct? How do I do this? And, do I have to check for each invalid input or can I just define a valid input and it automatically identifies it? If not, I would have to check for quite a few things.