Browse Source

Refactoring: Use created constant name for file

remotes/origin/feature/get-current-customer-account-balance
Shivam Chaudhary 2 years ago
parent
commit
2f729d8ff0
  1. 4
      src/currentCustomerAccountBalance.c

4
src/currentCustomerAccountBalance.c

@ -46,9 +46,9 @@ float getAvailableAccountBalance(int user_id) {
strcat(stringID, user_id_as_string);
// Now stringID is "ID=user_id"
FILE *file = fopen("CustomerData.txt", "r");
FILE *file = fopen(CUSTOMER_DATA_FILE, "r");
if(file == 0) {
printf("Error: customer data file cannot be opened!");
printf("Error: customer data file cannot be opened!\n");
return 0;
}
else {

Loading…
Cancel
Save