Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!uwm.edu!linac!midway!tartarus.uchicago.edu!mcdougal From: mcdougal@tartarus.uchicago.edu (Tom McDougal) Newsgroups: uchi.cs.cs355,comp.lang.c++ Subject: floats break istrstream Keywords: strstream,floats Message-ID: <1991May7.162120.20570@midway.uchicago.edu> Date: 7 May 91 16:21:20 GMT Sender: news@midway.uchicago.edu (NewsMistress) Reply-To: mcdougal@tartarus.uchicago.edu (Tom McDougal) Distribution: usa Organization: U. Chicago Computer Science Dept. Lines: 12 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)