strings and matrix

This is a discussion on strings and matrix within the C Programming forums, part of the General Programming Boards category; Hi guys!
I'm making this program to read a ruge text file (1.6Mb) and drop the lines into memmory.
But ...

So the code line strcpy(hst[c], strchr(hst[c],9+1)); is returning error on runtime. I checked the cause of it is +1).
When I change it to strcpy(hst[c], strchr(hst[c],9)); it runs ok but with the [TAB] on string. How do I get just the text after the TAB?

I have another question yet:
The file size and the line numbers can vary. So currently the textfile have exactly 58,735 lines so I'd like to create the hst matrix with the exact size of each line, then I'd save memmory usage

The second argument to strchr is supposed to be the character to look for. You're passing it the decimal value of 10 (or 9). Thus, it searches the string for the decimal value of 10 (or 9) and returns that location. 9 is tab. 10 is newline.

In short, you're using it incorrectly, or rather, unsafely. You should be checking the return value of strstr to make sure it isn't null.