[ Post New Message | Post Reply to this One | Send Private Email to Bob Dewar | Help ]

spaces in shop2.in

from Bob Dewar (instadeth@cableinet.co.uk)
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?
(posted 7403 days ago)

[ Previous | Next ]