Professional Documents
Culture Documents
10 Dev, 2013
Basic data types
Outline
Outline
In the examples above, typedefs are just synonyms for existing C types
and are used in variable and function declarations in the same way built-in
data types are used.
Custom data types The typedef keyword
#ifndef MYTYPES_H
#define MYTYPES_H
#define TRUE 1
#define FALSE 0
typedef int bool_t; /* bool_t is synonymous to int */
#endif
now include mytypes.h wherever you want to use bool_t. Notice that C99 already defines a
boolean data type