C File reading and writing
hi
I was writing an application where i need to write text to a file whose size is determined at runtime. I am familiar with this struct book { int num; char msg[FIXED_SIZE]; }; Then performing fread and fwrite. But what i require is char *msg rather than msg[FIXED_SIZE]. Could anyone give me some reference or a snippet of how to do this. Thank You Abhishek Samuel |
I don't get exactly your point
your two variables message are equivalent: msg[0]=*msg Sorry for this poor help, but I'm not fully acquainted with de details of fwrite but I guess that typecasting would be sufficient. PY |
Question: Class assignment.
Library Card Program? |
malloc()
|
All times are GMT -5. The time now is 02:49 PM. |