Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / How to read 1 line and 1 line utnil EOF?

Author
Message
Hayer
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 26th Jan 2007 12:44
Hi!
How do i read 1 line and then the next and print them out?
Im reading from a .txt file.. Plz help!

Mess with the bests, die like the restes!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Jan 2007 15:57




Hayer
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 26th Jan 2007 16:31
more problems...
How do i read each line in to a string?

Mess with the bests, die like the restes!
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 26th Jan 2007 17:06 Edited at: 26th Jan 2007 17:07
The second parameter in the read string function is the string you read the data into. So you could do something like this



And then you have the array which holds all the values. If you want to get an integer out of it you could just do this.




Hayer
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 26th Jan 2007 19:56
tnx..

Mess with the bests, die like the restes!

Login to post a reply

Server time is: 2024-11-26 21:34:41
Your offset time is: 2024-11-26 21:34:41