ECE160 - Lesson 5
Pointers and Arrays
Professor Hong
## Review & Questions
## The C Preprocessor
## File Inclusion *
#include "filename.h"
- includes file in directory of where the source program was found; else follows an implementation defined rule. *
#include
- follows an implementation-defined rule to find the file * We specify the directories inside the makefile with the -I. flag
## Macro Substitution *
#define name replacement text
- can also be used to substitute macros * Be careful as it literally just replaces a name with the replacement text. * Be careful with your order of operations.
## Conditional Inclusions ``` #if !defined(HDR) #define HDR /* contents of hdr.h go here */ #endif ``` * Useful for not including code you've already included when compiling.