Banking problem

Was thinking about how it would work.

The single user deposit and withdraw is simple but can't figure out how I would let multiple users open account in the bank.

I guess there's no point in making such program if we can't save the account details after closing the program... or can we?
Last edited on
You could create a class bank with a vector of account classes.
Hmm, vectors... haven't learned that yet
closed account (48T7M4Gy)
If you haven't learned about vectors then you might have learned about arrays.
http://www.cplusplus.com/doc/tutorial/arrays/

If you want to save the data to a file on the hard drive for instance ( ie 'persistence') this might be of interest for now or the future
http://www.cplusplus.com/doc/tutorial/files/

As already alluded to you can design/create your own data type by using classes, structs etc instead of an int say you can create/define a bank_account data type which could have an account_name and balance as part of it.
Topic archived. No new replies allowed.