[comp.lang.c++] floats break istrstream

mcdougal@tartarus.uchicago.edu (Tom McDougal) (05/07/91)

I was trying to read a float off the command line using the nifty
new istrstream function:

    float x;
    istrstream(argv[1]) >> x;

but no matter what I put on the command line, x=0.

Changing x to a double fixed the problem.

-Tom (mcdougal@cs.uchicago.edu)
   --Tom  (mcdougal@cs.uchicago.edu)