int Addition(int a, int b); {
cout << "Enter your two numbers" << endl;
cin >> a;
cin >> b;
cout << "Calculating. . ." << endl;
c = a + b;
cout << "Result: " << c << endl;
system("pause");
return 0;
}
So basically I'm trying to make this function work for something and when I run it in the if statement it skips the cin >> parts and just shows the cout << parts.
console output: Calculating. . .
Result: -1.85119e+62
Press any key to continue . . .
if statement: if (choose == "Addition")
{
Addition;
}
ok so i added the correct function call Addition(); but it gives me an error saying too few arguments in function call. what arguments would i put then?
also for the bottom curly bracket there is a weird error saying: expected a ';'
Would it surprise you to know that you're missing a ';' ?
Could you please help me with calling it? I'm really not sure I thought this was the right way.
What can I tell you that your textbook can't?
Seriously, this is absolutely fundamental stuff for C and C++ development. You can't get away with not learning it, so you might as well do it properly.