Preprocessor Directives
#define CM_PER_INCH 2.54
Defines constant macro (or symbolic constant) CM_PER_INCH as 2.54
Preprocessor replaces each occurrence of CM_PER_INCH in the rest of program to 2.54.
cm = CM_PER_INCH * inches;
? cm = 2.54 * inches;
Purpose?
Previous slide
Next slide
Back to first slide
View graphic version