sizeof() is calculated at compile time. At compile time, buffer[] had a known (and large) size - it was NOT just the size of a pointer.
Not so with the pointers whom you allocate memory to, at...
Type: Posts; User: Adak
sizeof() is calculated at compile time. At compile time, buffer[] had a known (and large) size - it was NOT just the size of a pointer.
Not so with the pointers whom you allocate memory to, at...
It appears from your pic that page[] needs to be quite a bit bigger to handle all the whitespace (which fgets() will be saving).
Isn't current->page a pointer to page, so you don't want sizeof()...
No. fscanf() won't read in an entire line of text. It will stop reading in, when the first word ends.
Use fgets(buffer, sizeof(buffer, filePointer). THAT will read in an entire line of text. And...