cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
#define, #undef usage
#define, #undef usage
Oct 22, 2013 at 8:58pm UTC
density
(103)
if i do something like:
1
2
3
#define a 1
#define b 2
#define c 3
do i have to do an
#undef
for them at the end of the file? or will defining a constant like this only hold for the .cc file you are working in or ?? is this bad practice like the evil global variable??
Oct 22, 2013 at 9:07pm UTC
mobotus
(275)
It is my understanding that #undef is used if you want to give another definition for an existing macro
http://www.cplusplus.com/doc/tutorial/preprocessor/
Last edited on
Oct 22, 2013 at 9:08pm UTC
Topic archived. No new replies allowed.