Search:

Type: Posts; User: Adak

Search: Search took 0.10 seconds.

  1. Replies
    6
    Views
    1,282

    sizeof() is calculated at compile time. At...

    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...
  2. Replies
    6
    Views
    1,282

    It appears from your pic that page[] needs to be...

    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()...
  3. Replies
    6
    Views
    1,282

    No. fscanf() won't read in an entire line of...

    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...
Results 1 to 3 of 3