GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 24-Sep-2003, 10:01
calculus87's Avatar
calculus87 calculus87 is offline
Junior Member
 
Join Date: Sep 2003
Location: FLorida
Posts: 41
calculus87 is on a distinguished road

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
CPP / C++ / C Code:
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.
 
 

Recent GIDBlogObservations of Iraq by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
gxx linker accepts only 7 object files danielxs66 C++ Forum 1 12-Dec-2003 09:27
How to create batch files without DOS box? rhino1616 Web Design Forum 3 18-Aug-2003 10:00
any one knows about the address of the deleted files in FAT shaam C++ Forum 1 09-Aug-2003 16:18
Dedicated to JDS who does not like flash files jrobbio Open Discussion Forum 9 15-Feb-2003 03:24
publishing Drirector/Shockwave files ...? darrin Web Design Forum 1 04-Oct-2002 17:21

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 22:38.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.