From 49f065ce3f515e6c2ec2bb230addd47a46f57759 Mon Sep 17 00:00:00 2001 From: Shivam Chaudhary Date: Fri, 27 Jan 2023 17:01:53 +0100 Subject: [PATCH] Add missing parameter for function --- src/withdrawMoney.c | 8 ++++---- src/withdrawMoney.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/withdrawMoney.c b/src/withdrawMoney.c index 66c201b..130a49a 100644 --- a/src/withdrawMoney.c +++ b/src/withdrawMoney.c @@ -15,11 +15,11 @@ void initiateWithdraw(float amountToWithdraw, float availableAccountBalance) { } } -void withdraw() { +void withdraw(int user_id) { float amountToWithdraw; char tryDifferentAmount; - float availableAccountBalance = getAvailableAccountBalance(); + float availableAccountBalance = getAvailableAccountBalance(user_id); printf("Enter amount to withdraw: "); scanf("%f", &amountToWithdraw); @@ -31,7 +31,7 @@ void withdraw() { printf("You don't have sufficient money to withdraw. Do you want to try different amount?\n[y]: Yes, any other key : exit"); scanf(" %c", &tryDifferentAmount); if (tryDifferentAmount == 'Y' || tryDifferentAmount == 'y') { - withdraw(); + withdraw(user_id); } else { showAllMenuEntries(); @@ -40,6 +40,6 @@ void withdraw() { } else { printf("Invalid Input! Please try again.\n"); - withdraw(); + withdraw(user_id); } } \ No newline at end of file diff --git a/src/withdrawMoney.h b/src/withdrawMoney.h index a109150..9554a66 100644 --- a/src/withdrawMoney.h +++ b/src/withdrawMoney.h @@ -1,4 +1,4 @@ #include -void withdraw(); +void withdraw(int user_id); void initiateWithdraw(float amountToWithdraw, float availableAccountBalance); \ No newline at end of file