true is a c++ keyword. In c, there is no built-in boolean type, hence, true, false, bool means nothing to c unless you instruct it on how to interpret them.
BTW, I failed to spot "while(true)" in your code. You must have hidden it somewhere else
C99 has stdbool.h, which includes bool, true, and false.