Computing.Net > Forums > Programming > c++ text file input

c++ text file input

Reply to Message Icon

Original Message
Name: yaser101
Date: January 27, 2003 at 14:05:17 Pacific
Subject: c++ text file input
OS: xp
CPU/Ram: 800mhz/128mb
Comment:

Hi, I have a text file that has different data types in one line.
for example the first line is string string int
and I am searching the file for a certain value of that int. I am not supposed to change the format of the file and also if the value isnt found i am supposed to add the record to the file in the same format. so my question is .. how do i read that line and store each value or string into my own variables ? meaning how do i read different data types in one line from a file ?
and then again how do i write to the file later on when i need to add the record ? meaning how do i write different data types in one line to a file ?
please help.. ty


Report Offensive Message For Removal


Response Number 1
Name: Lucixir
Date: January 27, 2003 at 20:41:54 Pacific
Reply: (edit)

Im kind of lost to what it is exactly you are trying to do, Could you rephrase your questions.

Meaning: What you are trying to do, along with seperate questions in order.

I kind of follow what you are asking but its not that clear.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: c++ text file input 

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 6 Days.
Discuss in The Lounge