ischneider
Programmer
I need to pass the value of a pointer from one function to another.
I have it set up like this...
void GetTheMoney();
void FigureTheWinnings(int *, int &BetAmount);
void GetTheMoney()
{
int BetAmount, *BetAmt_ptr = &BetAmount;
cout << "\nEnter the amount you wish to bet.";
cin >> *BetAmt_ptr;
}
void FigureTheWinnings(int *, int &BetAmount)
{
cout<< (... i need BetAmount or *BetAmt_ptr here!? )
}
i think my protoype format is wrong can anyone show my the correct format.
please and thank you!
I have it set up like this...
void GetTheMoney();
void FigureTheWinnings(int *, int &BetAmount);
void GetTheMoney()
{
int BetAmount, *BetAmt_ptr = &BetAmount;
cout << "\nEnter the amount you wish to bet.";
cin >> *BetAmt_ptr;
}
void FigureTheWinnings(int *, int &BetAmount)
{
cout<< (... i need BetAmount or *BetAmt_ptr here!? )
}
i think my protoype format is wrong can anyone show my the correct format.
please and thank you!