In C++ how do you use variables in if...then... or if...else or if... statements?
Here's what I mean.
When I enter something like this to make a calculator or something:
int main()
{
signed int a, b, c, d, e result;
cin >> a;
cin >> b;
cin >> c;
cin >> d;
cin >> e;
if(d=="+")
if(e=="-")
result = a + b - c
cout <<result;
}
It doesn't work.
What am I doing wrong?