hi all, thankyou once agian for your help the other day, but once agian i have been banging my head against a brick wall and need to call on your wisdom.
I have a text file containing hex values of the form
(maxium of 2 hex values per colum, 8 bits but sometimes there is only one!)
where the first colum contains an address and the second a data value to be written to that address. I need to read the file into an array of the form
as their are 2014 lines of code.
my attempt so far is :-
void display(int a, int v) ;
int address, value, i, j;
file_ptr = fopen("C:\\Documents and Settings\\Owner\\Desktop\\sta013.txt","rt");
if (file_ptr !=NULL)
printf("settings file found\n");
printf("total number of values read %d\n",i);
for (j=0; j<i-1;j++)
printf("file not found\n");
void display(int a,int v)
printf("%x %x\n", a,v);
however this gives the following results
would really appreciate any help! this little problem is stopping my completing vital code for my thesis and i am really stressed. Unfortunately code is not my strongest point so i may have dont something silly. but please point it out.
settings file found
total number of values read 2014
etc ... etc...