Re: Reading doubles from text file in visual C 6 doesn't work

From: Anthony Borla (ajborla_at_bigpond.com)
Date: 03/24/05

  • Next message: Anthony Borla: "[OT] Re: C#"
    Date: Thu, 24 Mar 2005 02:29:49 GMT
    
    

    "Robert W Hand" <rwhand@NOSPAMoperamail.com> wrote in message
    news:ku6441trdn8b166a4rs1p5tca88ipb705v@4ax.com...
    > On Wed, 23 Mar 2005 21:29:56 GMT, "Anthony Borla"
    > <ajborla@bigpond.com> wrote:
    >
    <SNIP>
    >
    > > printf("Sizeof float: %ld\n", sizeof(float));
    > > printf("Sizeof double: %ld\n", sizeof(double));
    > > printf("Sizeof long double: %ld\n",
    > > sizeof(long double));
    >
    > IIRC, C89 used an unsigned integer type for sizeof's output
    > as does C99. In general you might want to use %lu for C89
    > code or %zu for C99 code to avoid potential overflow.
    > Of course, sizeof(float) and sizeof(double) will be contained
    > by any integer type in C.
    >

    How embarrasing ! I was actually going to alter the above code before
    posting in light of your, and James's, recently posted advice on this
    matter. Sadly, I cut, and pasted old code rather first modifying it.

    Cheers,

    Anthony Borla


  • Next message: Anthony Borla: "[OT] Re: C#"

    Relevant Pages