12-23-2005, 02:47 PM
I am currently writing a bank account program that is keeping track of transactions and balance. I want to store the transaction and balance every time a button is pushed but not sure how to do it. I know I would need an array of unlimited size. Could someone help? I'm doing this because I have to save it to a file.
12-23-2005, 06:18 PM
I'm unsure of what language you're looking at, but with whatever it is, if you want an array of "unlimited" size (unlimited being in quotes since everything has a limit) then I may suggest a Linked List.
Being a java programmer this is rather easy in Java. Just create a class and then a class to handle the linked list.
If you wanted to be REALLY fancy you could make it doublely linked..but I think that's a bit much for what you're going for. (Unless you have to traverse backwards and fowards)