The Preprocessor: #Include #Ifdef #Define
The Preprocessor: #Include #Ifdef #Define
The Preprocessor
is macro-expanded to:
long n = 512 * sizeof(long);
is macro-expanded to:
n = (n - 2) > (k + 6) ? (n - 2) : (k + 6);
is expanded to
((++i) > (j) ? (++i) : (j))
is expanded as:
if ((tree->left) == 0) cout << "tree->left" << " is zero!\n";
the call
long internal(str);
expands to:
long internalstr;
#include "constants.h"
#ifndef _file_h_
#define _file_h_
contents of file.h goes here
#endif
12.4 Write a macro named When which returns the current date
and time as a string (e.g., "25 Dec 1995, 12:30:55"). Similarly,
write a macro named Where which returns the current location
in a file as a string (e.g., "file.h: line 25").