1

Right now i am testing for ch, and before pch tests for ; ch is null
so the program should end there itself when ch is null, why would it continue till pch??

The point is that ch is not NULL. Check the debug printf in my post

1

ok, but why is it happening? strtok should return the null pointer when no : is found

1

now wat it seems like is tht u r facing the same lid problem of buffer stacking in c/c++....using command to flush buffer may help u out!!!!!!!

0

Dont use scanf and gets for string input. Instead use fgets which is decribed in the second this of my previous post. You need to flush the input buffer (how to do that read the first this of my previous post). You need to flush the input buffer becouse if you not flush it you it will be unable to input the string second time. Please post your code.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.