Monday, July 27, 2009

Bool function in Borland Turbo C++?

Is it possible to use the "bool" function in Borland Turbo C++, and if not, is there some equivalent function?





Example:


bool a =true;





Thanks!

Bool function in Borland Turbo C++?
Unfortunately there is no "intrinsic" bool function in Turbo C++...It's been a while for me but there might be a system wide available constant such as "BOOL" ... if not you can define your own with say:





typdef byte bool;


#define true 1


#define false 0





and then just use as normal such as:





bool answer;


answer = true;


No comments:

Post a Comment