|
-
April 21st, 1999, 03:13 PM
#1
How to find a strin from a file
I got a .txt file here, and in the file there is a column, "TB". Under the column, there are two kinds of string, "T" or "B". I need write some codes for searing the string ,"T", and put the related data (with string"T") into a new file? Anyone can help me out with this??
thank you
-
April 22nd, 1999, 03:25 PM
#2
Re: How to find a strin from a file
You need write code like "parser", to read the text file and extract the string that you want.
1.you have to know what is the seperator.(, or space)
2.I am assuming the \n is the end of line.
Try to write a member function use strtok(..,..)and while loop (!file1.eof()) to get the string "T".
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|