C++ setw() problems

Discussion in 'OT Technology' started by C5Load, Feb 28, 2006.

  1. C5Load

    C5Load OT Resident UCLA fanatic

    Joined:
    Nov 27, 2001
    Messages:
    11,562
    Likes Received:
    0
    Location:
    Wherever Freddie takes me
    In this program,

    my file output comes out as such

    Mark Myers
    Gross Amount: ............ $ 10000.00
    Federal Tax: ............. $ 1500.00
    State Tax: ............... $ 350.00
    Social Security Tax: ..... $ 575.00
    Medicare/Medicaid Tax: ... $ 275.00
    Pension Plan: ............ $ 500.00
    Health Insurance: ........ $ 75.00
    Net Pay: ................. $ 6725.00

    (pardon the formatting, OT and C++ don't let me line up anything correctly).


    the file output is supposed to have the dollar amounts right justified. I've tried just about anything I can (using setw) to get those amounts to not line up next to the dollar signs, but nothing's working.

    Anyone able to help or point me in the right direction? AIM me or post here, please.
     

Share This Page