Alright, I'm probably going to become the biggest pain in the butt here during the days to come, but please bear with me.
#include <iostream>
int Subtract(int first, int second)
{
std::cout << "In Subtract(), recieved " << first << " and " << second << "\n";
return (first - second);
}
int main()
{
using std::cout;
using std::cin;
cout << "I'm in main()!\n";
int a, b, difference;
cout << "Enter two numbers: ";
cin >> a;
cin >> b;
cout << "\nCalling Subtract()\n";
difference=Subtract (a,b);
cout << "\nBack in main().\n";
cout << "difference was set to " << difference;
cout << "\nExiting...\n\n";
return 0;
}
I highlighted difference=Subtract (a,b), because I don't understand how this calls out the Subtract function.
Wouldn't you have to type in Subtract (a,b) then in another line make c=Subtract?