Hello, I just started learning C++ two days ago and I have done some stuff. Am trying to make a basic calculator but I keep getting the error 'else' without a previous 'if' I do not see why it has not worked. I have already searched the internet for this problem but all include semicolon and else if problems. I do not see any problems with my semicolons nor else if.
Kemort is right but let me sum it up a bit more for you, there needs to be braces around all if or else if or else statements, so don't forget to add those in.