Banking system in C++

I am working on banking system but I am stuck, I have made a system where program ask user to create account, deposit money, withdraw money and display account but the main problem is when an user create an account everything ok but when second user create an account first account is replaced by second account I don't know how to program so that it's hold both the account and display them properly . Any help will be appreciated

9th Apr 2021, 4:10 AM
Nitin Bisht
Nitin Bisht - avatar
2 Answers
+ 6
You need to structure all of your account data (login, transactions, balance, etc) into an object and then create an instance of that object for each customer. In real life, this would be in a database. But in practice terms, you can create an array of Customer objects and keep all customer data inside that instance of that object.
9th Apr 2021, 4:17 AM
Jerry Hobby
Jerry Hobby - avatar
+ 1
Jerry Hobby I will be glad if you explain with an program , I am a novice
9th Apr 2021, 8:19 AM
Nitin Bisht
Nitin Bisht - avatar