From 68e45dd3b5c357df8bd88e91ba732f49f74a722fa12a95ae64e659b0b35578aa Mon Sep 17 00:00:00 2001 From: Tyler Beckman Date: Sun, 22 Sep 2024 19:52:47 -0600 Subject: [PATCH] upload --- Makefile | 6 +++--- atmFunctions.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 68509bc..c814355 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -TARGET = CHANGEME -SRC_FILES = main.cpp +TARGET = A2 +SRC_FILES = main.cpp atmFunctions.cpp # Tyler's custom makefile extensions for CSCI200 (anyone can use these if they want) .DEFAULT_GOAL := all # Necessary so `make` doesn't run the "pack" target, as it is declared before "all" @@ -80,4 +80,4 @@ depend: .PHONY: all clean depend # DEPENDENCIES -main.o: main.cpp +main.o: main.cpp atmFunctions.h diff --git a/atmFunctions.cpp b/atmFunctions.cpp index 250cf9f..61b3c41 100644 --- a/atmFunctions.cpp +++ b/atmFunctions.cpp @@ -130,7 +130,7 @@ void withdraw_money(int* pDollars, int* pCents) { normalize_dollars(&dollarsToWithdraw, ¢sToWithdraw); // Convert dollar amounts to cents for easier subtraction - int totalCentWithdrawal = dollarsToWithdraw + (dollarsToWithdraw * 100); + int totalCentWithdrawal = centsToWithdraw + (dollarsToWithdraw * 100); *pCents += *pDollars * 100; *pDollars = 0;