diff --git a/src/CustomerData.txt b/src/CustomerData.txt index d5c417b..f847b08 100644 --- a/src/CustomerData.txt +++ b/src/CustomerData.txt @@ -3,4 +3,18 @@ ID=1234 forename=Max Surname=Mustermann password=example -balance=2000 \ No newline at end of file +balance=2000 + +1327=example +ID=1327 +forename=Max +Surname=Mustermann +password=example +balance=1500 + +1666=example +ID=1666 +forename=Max +Surname=Mustermann +password=example +balance=240 \ No newline at end of file diff --git a/src/a.exe b/src/a.exe index f28e6b3..cdc9794 100644 Binary files a/src/a.exe and b/src/a.exe differ diff --git a/src/updateCustomerAccountBalance.c b/src/updateCustomerAccountBalance.c index 764c317..9c868b2 100644 --- a/src/updateCustomerAccountBalance.c +++ b/src/updateCustomerAccountBalance.c @@ -58,7 +58,7 @@ bool updateAvailableAccountBalance(int user_id, float changeInBalance, bool posi strcat(stringID, user_id_as_string); FILE *file = fopen("CustomerData.txt", "r+"); - + printf(stringID); while(keep_reading) { fgets(buffer, MAX_LENGTH, file); currentLine++; @@ -81,11 +81,3 @@ bool updateAvailableAccountBalance(int user_id, float changeInBalance, bool posi float newBalance = (positive) ? availableBalance+changeInBalance : availableBalance-changeInBalance; replaceBalanceInString(newBalance,currentLine); } - -int main(){ - - updateAvailableAccountBalance(1234,500, true); - return 0; - -} -