what fixed does

This is a discussion on what fixed does within the C++ Programming forums, part of the General Programming Boards category; can anyone tell me what the "fixed" kwyword says actually...

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    181

    what fixed does

    can anyone tell me what the "fixed" kwyword says actually

  2. #2
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,807
    Last time I checked fixed wasn't a keyword.
    Woop?

  3. #3
    fuh
    fuh is offline
    Attack hamster fuh's Avatar
    Join Date
    Dec 2002
    Posts
    176
    Could you give us an example?
    Stupid things pop singers say

    "I get to go to lots of overseas places, like Canada."
    - Britney Spears

    "I love what you've done with the place!"
    -Jessica Simpson upon meeting the Secretary of Interior during tour of the White House

  4. #4
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,803
    The fixed stream manipulator causes floating point output to use decimal notation as opposed to scientific/exponential notation.

    Code:
    double d = 9167.872;
    cout << scientific << d << endl << fixed << d << endl;
    Output:
    Code:
    9.167872e+003
    9167.872000
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  5. #5
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,807
    Going on what hk said read this to see more i/o settings
    http://www.cppreference.com/io_flags.html#format_flags
    Woop?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. reading fixed length
    By Cpro in forum C++ Programming
    Replies: 4
    Last Post: 07-03-2008, 03:12 PM
  3. How accurate is the following...
    By emeyer in forum C Programming
    Replies: 22
    Last Post: 12-07-2005, 11:07 AM
  4. Fixed point MOD (for sin LUT)
    By Pea in forum C Programming
    Replies: 0
    Last Post: 04-10-2005, 06:03 PM
  5. Linking error
    By DockyD in forum C++ Programming
    Replies: 10
    Last Post: 01-20-2003, 04:27 AM

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