Hey,
Simple answer i'm sure, but can't seem to find a clear answer...
How do you write a text file to a character array in C?
mjh
Printable View
Hey,
Simple answer i'm sure, but can't seem to find a clear answer...
How do you write a text file to a character array in C?
mjh
By simply reading its content into a char array using fgets(), just as explained here (urgh, that link is actually pretty bad), better explained here.
You might also want to read the C string tutorial where an example with fgets() is given.
or strcpy and other function fro manipulating strings like sprintf