Linked Lists and an Inventory Program
I am trying to write code to process a return order and a purchase order for an inventory program. However, I get some strange output! I'm not very familiar with linked lists, but basically on a purchase order I am taking information from a master inventory list with DVD's, CD's, etc. and checking the quantity in stock against the quantity that should be in stock, and building a new order list based on that. It works great for the FIRST item only, but it repeats only the first line as many times as I have items in the inventory list. Besides that, the title display should align left, and it actually doesn't really align and adds a couple of extra characters at the end of the title. I can attach a jpg if it helps. I have attached copies of my code snippets files rather than pasting here because I suspect it is not my display method but rather the method I am building the new order list with.
Of course I don't expect (OR WANT) anybody to do my homework for me but I could really use some pointers.
Last edited by marQade; 05-12-2008 at 07:33 PM.
Reason: Replaced incomplete file upload
Alright...I've figured out part of my own problem...putting it here so anybody else who was curious can find out.
To solve the issue of one item repeating itself on the list, the line
needs to be inside the loop. This still doesn't fix the display problem, so I will try a different method of display.
fromCur = *fromIter;
The display works when using std::left and std::fixed.