Question about: Static Variables with classes

I need to do the following for my hw but have a question.
I'm supposed to build an atm machine with the following: Main.cpp, Account.h, Account.cpp, Clock.h, Clock.cpp
The main is given to me. I'm not allowed to change it.
I need to build a static variable that keeps track of the total amount of money withdrawn from the bank. Where do I declare it and where do I initialize it to zero?
My deadline is in 1 hour and 50 minutes.
Thanks

Last edited on
Where do I declare it and where do I initialize it to zero?

Most likely as a member of the Account class
declare it as inline static member inside class and immediately assign to zero.
Also, perhaps you shouldn't have waited until the assignment was due in 1 hour and 50 minutes to start it.
Thanks!
Topic archived. No new replies allowed.