8 digits in index of array??

This is a discussion on 8 digits in index of array?? within the C++ Programming forums, part of the General Programming Boards category; hi I am trying to store 8digits in one array index, but it can only shows up to 6.. how ...

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    33

    8 digits in index of array??

    hi
    I am trying to store 8digits in one array index, but it can only shows up to 6.. how can I change that?

    Code:
    double array[]={80702001,40,70,60,55.5}
    I get 8.0702e+07 for the first one the rest are ok..

    thanks

  2. #2
    Registered User
    Join Date
    Mar 2010
    Posts
    109
    What are you using to display the number?

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,848
    Check the width and precision you're using to print floats.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Incrementing array index in a node.
    By JFonseka in forum C Programming
    Replies: 8
    Last Post: 04-15-2008, 04:39 AM
  2. Getting rid of array index brackets
    By jtullo in forum C Programming
    Replies: 3
    Last Post: 04-22-2007, 01:16 AM
  3. 2d array question
    By gmanUK in forum C Programming
    Replies: 2
    Last Post: 04-21-2006, 01:20 PM
  4. Reversing character array without accessing thro' index.
    By Roaring_Tiger in forum C Programming
    Replies: 8
    Last Post: 08-28-2004, 11:52 AM
  5. file index update error
    By daluu in forum C Programming
    Replies: 1
    Last Post: 04-28-2003, 03:47 AM

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