Search:

Type: Posts; User: nonoob

Search: Search took 0.01 seconds.

  1. Replies
    20
    Views
    3,820

    Perhaps the input file (and buffer) are too big...

    Perhaps the input file (and buffer) are too big to be stacked. How about try
    char *input;
    ... determine size needed ...
    input = malloc(length + 1); /* dynamically allocate memory */
  2. Replies
    20
    Views
    3,820

    Then don't initialize it. Assuming the compiler...

    Then don't initialize it. Assuming the compiler likes char input[length+1];. Be sure after the bottom if your loop, before the printf, you put input[i] = '\0';. All strings must have terminating null.
Results 1 to 2 of 2