Displaying full floating point numbers in c++

Discussion in 'Software' started by BrokenArrows, Dec 31, 2004.

  1. BrokenArrows

    BrokenArrows Sergeant

    Hi i currently wrote this program to work out a maths problem for my class and it works fine but i was wondering how i can stop c++ from outputing my double in this format.

    1.43301e+07

    i want it to be displayed in the full format
     
  2. MerlinCorey

    MerlinCorey Private E-2

    Give more information. Are you using STL? Or just plain old C functions? OS? compiler? Your experience?
     
  3. BrokenArrows

    BrokenArrows Sergeant

    yes im using a kind mixture of STL and C functions, windows xp, borland 5.02.
    experience well im in college but havent been programming for about 6 months so im a bit out of practise but id consider myself pretty experienced.
     
  4. BrokenArrows

    BrokenArrows Sergeant

    never mind i just found the solution


    use this line of code to not use scientific notation and replace fixed with scientific to do the opposite but its oviously set as scientific as a standard.

    cout.setf(ios::fixed);
     
  5. MerlinCorey

    MerlinCorey Private E-2


MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds