CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    May 2008
    Posts
    6

    Creating a table with cout

    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
    Last edited by Timmeh041; May 26th, 2008 at 09:53 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured