If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > C++, files

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-24-03, 11:58
calculus87 calculus87 is offline
Registered User
 
Join Date: Sep 2003
Posts: 23
C++, files

I have a question for yall,
I would like to read from a file. Now I would like to read only one line. I would like to read that line string by string until that one line is done. I would then like to exit.
Okay, now here is what is done.
I can read from a file.
I know how to read one string at a time, and I know how to read in an entire line using getline()
I can exit

I am not sure how to use the >> command to only read string by string for one line.

I was trying something like

string a;
input2.open("out123456789.txt");
while (a!=eol)
input2>>a;

Thanks for the help
Hopefully I have made myself clear.

Sincerely,
Ronald
__________________
This message is a natural product made from recycled electrons. The slight
variations in spelling and grammar enhance its individual character and
beauty and in no way are to be considered flaws or defects.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On