|
|
@ -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; |
|
|
|
|
|
|
|
} |
|
|
|
|