spaces in shop2.in

greenspun.com : LUSENET : Steve Heller's books : One Thread

Recently i purchased "Learning to Program in C++" which is very good. I am using it in conjunction with Borland C++ Builder 4. I'm at the end of chapter 6 now and have one problem with reading the inventory file (shop2.in). The program compiles OK, but because the first entry "3-ounce cups" of the inventory file has a space in it, it throws a wobbly. I read in the help file that white space characters are skipped automatically, and this indeed seems to be the case when i try a standard cin function using keyboard input. There is a manipulator called noskipws that you seem to have to use, but i have no idea where this is to be used and was wondering if you could shed some light on the subject?

-- Bob Dewar (instadeth@cableinet.co.uk), October 17, 2001

Moderation questions? read the FAQ