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 */
Type: Posts; User: nonoob
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 */
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.