![]() |
How to read the data line by line from a File?
In my application,in Dialog1 writing the data line by line,upto this working perfectly,where as in Dialog2 while reading the data line by line always reading the first line.
How to read the data line by line?Though simple one,Iam in confusion.Pls help me. In Dialog1, for File.txt ,writing the names as Name1 Name2 Name3 and on the other side I want to read the names one by one,but In Dialog2 always reading the Name1,not going to the second line. In Dialog1 Quote:
Quote:
|
Re: How to read the data line by line from a File?
Hai,
pls see the File.txt.In Dialog1 Iam encrypting the data and writing the encrypted data to File.In Dialog2, I want to read the encrypted data from File one by one.Is this correct way of writing encrypted data to a File or Is it better to encode the encrypted data?If anybody having the sample code for Encoding/Decoding pls post it. |
Re: How to read the data line by line from a File?
1. Use [code][/code] tags when posting code.
2. Why are you trying to read and write to the file at the same time? |
Re: How to read the data line by line from a File?
Please try to post instead of giving it as an attachment. I have removed the attachment from the post.
|
Re: How to read the data line by line from a File?
In File.txt Iam writing the following encrypted text.Now,I want to read the encrypted data line by line.How to do this?Pls help me.
Quote:
|
Re: How to read the data line by line from a File?
Encrypted by whom, using what algorithm and with what key?
Good algorithms will destroy any sense of the idea of "lines" in the file and present you with a stream of what looks like random bytes. |
Re: How to read the data line by line from a File?
Hai,
My major problem is how to read the data line by line from a File?Pls gave me an idea. |
Re: How to read the data line by line from a File?
Well if it's encrypted you have two choices
- fgetc, to read the file one byte at a time - fread, to read a whole block of bytes at a time. Having read some bytes, you then need to decrypt them in order to work out what the real data is, and where the lines are. |
| All times are GMT +5.5. The time now is 19:28. |