Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.
Reading from input
Name: CommonChild Date: April 9, 2002 at 12:28:18 Pacific
Comment:
How do I get my input stream to read from the next line of input when reading from a ".dat" file. I'm using the "getline" function to do my extraction, but how do I get it to read to the next line?
Name: Eric Date: April 9, 2002 at 12:50:15 Pacific
Reply:
One way is to extract enough chars with each getline call to be sure that a whole line has been extracted. If you try to get more characters than there is in a line, getline will stop at the '\n' char anyway. The next time you use getline it will read from the next line.
0
Response Number 2
Name: CommonChild Date: April 9, 2002 at 12:58:25 Pacific
Reply:
ok Thanks a lot I know it was simple, remedial question I figured it out after I sent the message out...lol Go figure Thanks again, however.
0
Response Number 3
Name: Eric Date: April 9, 2002 at 12:59:48 Pacific
Summary: I'm wanting to have my program write data to a text file, and then have the ability to read back from it... so far I can get it to write to the file...but I'm damned if I can get it to read from it! A...
Summary: Hi all , I'm trying to read from a USB Barcode-Reader (on Solaris 8) , I've written the following code ... But the program always exits on : (rval = ioctl(fd, I_PUSH,"usbkbm")) Please if anyone has a...
Summary: One method is to associate the data file with a file handle using the exec command. This script associates file handle 6 and then within the loop explicitly reads from standard input, file handle 1: ...