Hi,
I realise this may be a simple problem but i've really been pulling my hair out at the moment.
I've got a text file, which I need to read each of the 15 characters (numbers and letters) on each line in to a new record in an array (called defarray) - but I can't seem to do it. I've managed to work out the code to read the text file and output each line but not save it into an array.
Text file (fp called = 'definitions') looks like;
ABCDEF123AAABB
ABCEEF123AADFB
ABCDDF123ADSHB
etc...
currently I have the following;
while(!=feof(definitions))
{
fscanf(definitions, "%s\n, & defarray[i]);
printf("s\n", &defarray[i]);
i++
}
I would appreciate an help or ideas with this. The script is a C script not C++ etc.
Thank you.