you probably want to create a structure to hold the data for each customer so that the values will not disappear on each iteration of the do-loop. Then you will need an array or a linked list of those structures. After entering the account number search the array or list for the structure that contains that account number. If found then adjust the members of the structure with the values you enter in the do-loop. If the structure is not in the list, fill out a new structure and add it to the array or list.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
There are many options available to you. Personally, I would suggest using classes over structs in c++, as you can also define private member functions.
If you are using an array of objects don't forget to clear up after with delete[]. You could also use a vector of objects.
But the most important thing is, if you had to ask what they are, you probably need to read up on them before even attempting to integrate their usage in your current program.
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
There are many options available to you. Personally, I would suggest using classes over structs in c++, as you can also define private member functions. .
In c++ structures are nearly identical to classes, but yes a formal class would be preferable. structures can have private members too, just like classes.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343