tags:

views:

61

answers:

2

Simple question really.. I'm just starting out programming with Xcode and I'm creating a simple ANSI C program and the Xcode book I'm reading says to include c.h because it defines true and false for you among other things. I don't have c.h though and I'm wondering if it's a big deal or not.

How can I solve this problem?

+4  A: 

c.h is not a standard header. Is it an include file defined in the book? Try removing the include and see if the code compiles.

pau.estalella
the C99 header for boolean types is called `stdbool.h`; there's not really any need for it, though: compliant compilers will support the builtin type `_Bool`, which has the range `{0,1}`
Christoph
A: 

The book made out that it was a standard header. The only thing that it was used for was the definitions of true and false, so I defined them by hand like I guess everyone else does and compiled without it.

pawz