if (operation = '+' || operation = '-' || operation = '*' || operation = '/' || operation = '%')//error line
{
printf("Enter the first operand:\t\t");
getchar();
scanf("%d", &num1);
printf("Enter the second operand:\t\t");
getchar();
scanf("%d", &num2);
}
It gives out an error saying :
Error: expresion must be a modifiable value
It gives me the error on that if line , on all of the arguments but the one that says
operation = '%'
what is the problem ?? thank you guys :)
You made a typo and instead of the comparison operator
==
you wrote the assignment operator=
Instead of
there must be
You could write the if statement simpler. For example
Or even without declaring pointer
p