Timmeh041
May 26th, 2008, 07:10 AM
Hello all.
I have an array called productinfo, with the attributes of name, quantity and price. I am trying to create a invoice of this with all the columns + total amount (price * quantity).
Below is my code which i currently have used to generate the invoice.
I am sure most of you more experienced people will be able to see that when displayed, this code does not guarantee that all data/columns come out evenly. Come rows will be one way, while the next is so many pixels to left or right and all.
I am kinda at a loss as to what code to implement in order to fix it. Truth be told i am rather new to c++, and this iomanip thing is confusin me as to the exact thing i am looking for to do what i want.
Is there any helpful hints or code additions anyone can make? Is there a good online tutorial or something? I tried looking around here abit but i think most of the results were populating tables - as in a 2 dimensional array or something. It confuses me. I will be more then willing to post more code if asked.
Thanks,
Tim
I have an array called productinfo, with the attributes of name, quantity and price. I am trying to create a invoice of this with all the columns + total amount (price * quantity).
Below is my code which i currently have used to generate the invoice.
I am sure most of you more experienced people will be able to see that when displayed, this code does not guarantee that all data/columns come out evenly. Come rows will be one way, while the next is so many pixels to left or right and all.
I am kinda at a loss as to what code to implement in order to fix it. Truth be told i am rather new to c++, and this iomanip thing is confusin me as to the exact thing i am looking for to do what i want.
Is there any helpful hints or code additions anyone can make? Is there a good online tutorial or something? I tried looking around here abit but i think most of the results were populating tables - as in a 2 dimensional array or something. It confuses me. I will be more then willing to post more code if asked.
Thanks,
Tim