Searching a char in a data file

Started by
3 comments, last by NexusOrganicus 21 years, 6 months ago
Hi me again need help I create a textfile.txt and save data in it A // this should tell me where i am in that file 10001001 // and this is my data 22222111 12222222 12212121 12000001 01111111 12222212 11000022 B ...... and so on ......... So please if any of you gurus knows how ,then please tell me how i can get the data of my char[] // searching in my file for the data i need! Thanks NO
_______D___
Advertisement
read the file into a string and do a strstr() on it.
Thanks
but is there an other way to do ? can´t i search in the filestream for a specific character
Thanks
no
_______D___
Sure you can, with a simple while(),
just read a char, check if it''s within
the range of you tags (A-Z for example),
check if it''s the right one, and if it is,
read until you find another tag.
I guess I would store the length of the
data in each chunk aswell, would make the
loop easier to read

T


--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.
Thanks
Could i also count the size of my imput
and then i count the whole size of my file and then
i divide the size of my file throug the imput data ?
then i would know how many entrys i have
right ?
or wrong ?
questions i have so many of them
thanks for your time
n
_______D___

This topic is closed to new replies.

Advertisement