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:
unsigned char* data[100];
//Open a File and write the data
FILE *pFile;
pFile = fopen ("File.txt","w+t");
for(TInt i=0;i<10;i++)
{
if(pFile!=NULL)
{
//write the data to File
fscanf(pFile,"%s\r\n",data);
fprintf(pFile,"%s\r\n",data);
}
}
In Dialog2

Quote:
//Open a File and read the data
FILE *pFile;
pFile = fopen ("File.txt","r+t");
for(TInt i=0;i<10;i++)
{
if(pFile!=NULL)
{
fscanf(pFile,"%s\r\n",data);
}
}