10-19-2012, 05:37 PM
|
#1
|
Banned
Join Date: Aug 2006
Posts: 324
|
C++ preprocessor directives
Hi guys, i've been scratching my head about these for a while now, i'm not sure WHAT and WHY they should be used for.
They are statement that are processed before the compilation is done, *as i've read*. But ... why would you use instead of just using a regular variable in your program ?? Anybody has any idea.
#define ZERO 0;
#define TRUE 1;
instead of
int ZERO{}; or int ZERO = 0; or int ZERO = {0}; or int ZERO = {};
int TRUE{1};
i just don't get it guys. Plus why does #define doesnt require a type for the variable.....? i'm really confused about em.
Thx alot.
|
|
|