S
Summu82
Hi i have to write some data in a binary file
fputc(0x22,f2);
this works fine
also
int data =0x22;
fputc(0x22,f2);
works fine
but
int data;
data =0x22;
fputc(0x22,f2);
gives error
i dont know the data before hand actually i have to comput timestamp
find the year and then put it into this like 06 for 2006 and then
similarly for month and date
so please suggest how can i achiev something like
int data;
timestamp1= getyear();
data =0xtimestamp1;
fputc(data,f2);
Thanks & Regards
sumeet
fputc(0x22,f2);
this works fine
also
int data =0x22;
fputc(0x22,f2);
works fine
but
int data;
data =0x22;
fputc(0x22,f2);
gives error
i dont know the data before hand actually i have to comput timestamp
find the year and then put it into this like 06 for 2006 and then
similarly for month and date
so please suggest how can i achiev something like
int data;
timestamp1= getyear();
data =0xtimestamp1;
fputc(data,f2);
Thanks & Regards
sumeet