objective c - How to print BOOLs -
this question has answer here:
- how print boolean flag in nslog? 10 answers
i want print bool (which documented signed char) without compiler warnings:
nslog(@"parsing result = %hhd", parsingresult); // inside ios program. xocde 6 but "format specifies type 'char' argument has type 'bool' (aka 'bool')".
nslog(parsingresult ? @"yes" : @"no");
Comments
Post a Comment