Objective-C: BOOL vs bool

Vi o "novo tipo"BOOL (YES, NO).

Li que esse tipo é quase como um caracter

Para testar, fiz:

NSLog(@"Size of BOOL %d", sizeof(BOOL));
NSLog(@"Size of bool %d", sizeof(bool));

É bom ver que os dois logs exibem "1" (às vezes, em C ++ bool é um int e seu tamanho é

Então eu estava me perguntando se havia algum problema com o tipo bool ou algo assi

Posso usar bool (que parece funcionar) sem perder velocidad

questionAnswers(9)

yourAnswerToTheQuestion