How to print BOOL

I want to print BOOL (which is documented as a signed char) without any compiler warnings:

NSLog(@"Parsing Result = %hhd", parsingResult);

//  inside some iOS program. Xocde 6

      

But I get "The format is" char "but the argument is" BOOL "(aka 'bool')".

+3


source to share


1 answer


NSLog(parsingResult ? @"YES" : @"NO");

      



+8


source







All Articles