I'm trying to learn me some C, and have run into what is probably a simple problem. I'm trying to compile some code which contains the following declaration:
int32 count;
However, this results in an error at compile time:
test.c:21: error: ‘int32’ undeclared (first use in this function)
Is there a particular compile-time option I need to set for gcc, or an #include
directive that will solve this?
p.s. I'm running on Ubuntu Intrepid.
The int32
type isn't standard C - the standard equivalent is to #include <stdint.h>
and use int32_t
.
However, as a POSIX system, on Ubuntu plain int
is (at least) 32 bit so you could just use that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With