I have made a calculator but the problem is that I can't make it so that there can't be two operators in a row, for example (4*2++).
The user shouldn't be able to press two operators in a row. My fix was that if the user puts in a "+", i would look for the last character in my >calculation> (holds all the input numbers and operators) string
and change that operator according to
which operator the user presses next. Example, if the user puts in, 4*2+, then presses "-", the <calculation> is changed to, 4*2- . This somehow doesn't work. Is there anything I'm missing?