Setw() and setprecision?

This is a discussion on Setw() and setprecision? within the C++ Programming forums, part of the General Programming Boards category; I'm trying to set up a fake billing program. In my intro output I'm trying to put the text out ...

  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    33

    Setw() and setprecision?

    I'm trying to set up a fake billing program. In my intro output I'm trying to put the text out in the middle of the screen using these guys but I'm a bit confused with em. Can anyone give me a hand? Thanks in advance.

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Sure, we'll help. Just post your code that's giving you troubles and someone will assist you.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User
    Join Date
    Sep 2003
    Posts
    33
    I'm just not sure how to use them
    would I do like a cout<<setw(number of spaces in here)cout<<"text"
    And I'm not completely 100% on what setprecision does.

  4. #4
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Away.

  5. #5
    twm
    twm is offline
    root
    Join Date
    Sep 2003
    Posts
    232
    There's also something about this on the Cprogramming FAQ.
    The information given in this message is known to work on FreeBSD 4.8 STABLE.
    *The above statement is false if I was too lazy to test it.*
    Please take note that I am not a technical writer, nor do I care to become one.
    If someone finds a mistake, gleaming error or typo, do me a favor...bite me.
    Don't assume that I'm ever entirely serious or entirely joking.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21