The following command helps you compile the refactored program:
g++ Thread.cpp Account.cpp main.cpp -o account.exe -std=c++17 -lpthread
Brilliant! If all goes well, the program should compile smoothly without making any noise.
Just take a quick look at the output shown here before we move on to the next topic:

Great! It works fine. The DEPOSITOR and WITHDRAWER threads seem to work cooperatively without messing up the balance and print statements. After all, we have refactored the code to make the code cleaner without modifying the functionality.