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 In Dialog2
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.
1. Use [code][/code] tags when posting code. 2. Why are you trying to read and write to the file at the same time?
Please try to post instead of giving it as an attachment. I have removed the attachment from the post.
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.
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.
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.