Just to let you know, BBCode tags have a starting and ending tag. Put [code] at the beginning of your code, and [/code] at the end of your code. (At the moment, you didn't put a proper closing tag on your code, which is why they didn't display properly.)
I see you are using degraded and old coding styles.
#include <iostream.h> should be
#include <iostream>, and then either prefixing all Standard Template Library objects with std::, or using the statement
using namespace std; after including iostream.
In your main function:
int main()
{//start of function main
int gbp;
int usd;
int euro;
inputAmount (gbp); // shouldn't it be inputAmount(&gbp) ?
commission= calCommission(gbp,usd,euro); // why are you passing 3 parameters to a 2-parameter function?
}//end of function main Where did
commission come from? You never declared it, so of course the compiler will give errors on that.
Remember, all instructions/statements must be
inside the function, unless you meant it to be global, in which case it should not be sandwiched in between inputAmount() and the starting brace. However, if you would follow my recommendation, move it inside the function so it's not global.
void inputAmount (int&gbp)
int select= 0;
{//start of function inputAmount
cout << "Please select from the following: " << endl; Also, I'm noticing that you're trying to use
select inside of calCommission(). This does not work, because it was (should have been) declared inside of inputAmount(). Your best option right now is to make inputAmount() return the selection, and use this as a parameter for calComission().
That way, you're using proper programming practices and not using globals.
In calCommission, there's this variable you're using called "commission", which you never declared. Also:
//definition of function calCommission
int calCommission(int usd, int euro)
{//start of function calCommission
if (select==1 and gbp <= 1000) // missing '{'
commission= (usd or euro)+(usd or euro)*0.01) // missing ';'
cout<<"Total Amount after commision:£"<<total;
}
else if (select==2 and gbp >1000) // missing '{'
commission= (usd or euro)+(usd or euro)*0.03) // missing ';'
cout<<"Total Amount after commision:£"<<total;
}//end of function calCommission As you can see, there are a number of errors in the code ^_^. I've commented the errors so you can see them.
Hope this helps