Home ¦ Archives > Tag: C

Why bother to have type definitions if we already have macros?

Macro Definitions

Macro definitions are recognized during preprocessing phase, and macro names are naively replaced by the preprocessor.

Consider following example:

#define Int_Ptr (int *)

Int_Ptr a, b, c;

In the above case, only a will be defined as a pointer pointed to and Integer, whereas b and c are two ...

© Teng Long. Built using Pelican. Theme by Giulio Fidente on github.