N
Nimmy
Hi,
I have code like this to read strings and integers from an input file....
FILE *FileRead, *FileWrite;
char lcBIC[200], lcIBAN[200];
int lcAccNumber[200], lcAmount[200];
int i, total_records;
FileRead = fopen( "input.txt" , "r" );
FileWrite = fopen( "output.txt", "r+w" );
for (i = 1; i <=2; ++i)
{
fscanf(FileRead, "%s,%d\n",&lcBIC, &lcAccNumber);
}
*********
But problem with this code is that it is reading the whole line including
commas and putting them in lcBIC, how can I read individual variables and
transfer to the variables?
Thanks
I have code like this to read strings and integers from an input file....
FILE *FileRead, *FileWrite;
char lcBIC[200], lcIBAN[200];
int lcAccNumber[200], lcAmount[200];
int i, total_records;
FileRead = fopen( "input.txt" , "r" );
FileWrite = fopen( "output.txt", "r+w" );
for (i = 1; i <=2; ++i)
{
fscanf(FileRead, "%s,%d\n",&lcBIC, &lcAccNumber);
}
*********
But problem with this code is that it is reading the whole line including
commas and putting them in lcBIC, how can I read individual variables and
transfer to the variables?
Thanks