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;