I was going to make a calculator, and whaddayaknow, it didn't work. Whatever I do, I can't seem to fix it.
Here comes the source code...
And here are the problems...Code:[tag]#include <iostream> using namespace std; int main() { int a; cout<<"Please enter a number up to a maximum of 10 billions: "; cin>>a; int b; cout<<"Please enter another number up to a maximum of 10 billions: "; cin>>b; char c; cout<<"What would you like to do with the numbers? "; cin>>c; if c == + int d = a + b; if c == - int d = a - b; if c == * int d = a * b; cout<<"The answer is... "<< d <<"\n"; cin>>d; }[/tag]
So, um... Help?Code:[tag] error: expected '(' before "c" error: expected '(' before "c" error: expected '(' before "c" error: 'd' was not declared in this scope[/tag]
PS. I have only done the first 2 tutorials, so I am aware that I am a newbie, and that you probably think this is the easiest things in the world.