@brian,brianfry713 wrote:Try changing your tokenize function. It throws a RE if there is a trailing space on a line. I used sscanf().
Thanks a lot. I didn't realised that the input lines can have trailing spaces.
I made a change on my tokenize function to check for reaching end of string.