Hey!
I have a simple problem to solve and I encounter an error in the code I wrote. Could you tell me what is wrong with my particular code or if it`s fundamentally wrong what should I do. :)
The problem is: Write a simple arithmetic expression translator that reads in expressions such as 25.5 + 34.2 and displays their value. Each expression has
two numbers separated by an arithmetic operator.
The first error I get is: "no match for 'operator==' in 'sign == '+''". There are more errors, but I don`t think it`s needed to post every single one.
My logic on the code is this: give my sentinel value the lowest possible integer
do not stop to print the result of the two numbers, until you enter -2147483648.
Afterwards it is pretty much a simple if statement with the exception that when we divide the second number can not be 0.
Thank you for that. I realise that I don`t have a very good understanding on string, but I`m working on it.
Program runs, but I notice two problems.
First, for some reason it only adds the number regardless of my input(doesn`t multiply or substract or divide).
Second, it does not stop when I enter my sentinel value.
Ahm, in the code I have last saved i have it fixed in line 44, which should be Num1 / Num2. And I tried a do-while loop instead, but it still does not work. Would you care to PM me or write here your code that as you say runs ?