Greetings all, I have another question. I'm working on building a vector and everytime I add another item, it replaces all the items in the vector with that item, so all prior additions are replaced. I'm using this:
customerList.addElement(cust2);
where customerList is my vector, and cust2 is an object from one of my classes. It is contained in a while loop that keeps checking if the user wants to add more customers. addElement appends to the end of the vector right? If so, what would I be doing that would make it overwrite all the other entries in the vector? The vector is growing just fine, just everything gets replaced with the last entry. It's probably something really dumb but I just don't see it. Thanks in advance for any help/suggestions.
customerList.addElement(cust2);
where customerList is my vector, and cust2 is an object from one of my classes. It is contained in a while loop that keeps checking if the user wants to add more customers. addElement appends to the end of the vector right? If so, what would I be doing that would make it overwrite all the other entries in the vector? The vector is growing just fine, just everything gets replaced with the last entry. It's probably something really dumb but I just don't see it. Thanks in advance for any help/suggestions.