i fixed it. i simply had to addto the code.Code:void *__gxx_personality_v0;
i fixed it. i simply had to addto the code.Code:void *__gxx_personality_v0;
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.
Okay, try
Then, if that doesn't work, post your exact code, so we can try compiling and toying with it. Also, it might help if you gave us your gcc version. Though unlikely, it may be a bit outdated, or have a known bug.Code:gcc -Wall -std=c99 main.c
also, i already posted all the source code in the first post
I just saw that you "fixed" it (your replied while I was writing my reply), but really, declaring that variable to shut the compiler up is a hack, not a fix. There is something strange about how your code is being compiled. For example, file names in Linux are case sensitive, so if it was .C (uppercase) instead of .c, gcc would assume it's C++, and try to compile it as such.
Also, provide the exact command you used to compile it. By exact, I mean copy and paste it from your terminal or IDE. You may have done that in post #15, or you may have simply looked at the command and retyped it by hand, omitting something critical like an uppercase .C extension.
Also, I know you posted your code in the first post, but you changed it since then, possibly you changed several things. That means we don't know the exact state of your current code, so we can't exactly replicate your problem, and it's hard for us to fix it.
I'm just trying to be thorough, and help you solve your problem, not sweep it under the rug.
Perhaps the input file (and buffer) are too big to be stacked. How about tryCode:char *input; ... determine size needed ... input = malloc(length + 1); /* dynamically allocate memory */