I\'m looking for a cross platform (Windows + Linux) solution to reading the contents of an entire file into a char *.
char *
This is what I\'ve got now:
The function fread will read from the stream and not terminate on end-of-line characters.
fread
From the man page, you have:
man
size_t fread(void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream);
which reads in nitems of size size.