add below code top of your file
#ifndef __cplusplus typedef unsigned char bool static const bool false =0; static const bool true =1; #endif