T
tweak
What does this do?
#if 1
include "x.h"
#endif
I have never seen #if with just a 1.
Thanks,
Brian
#if 1
include "x.h"
#endif
I have never seen #if with just a 1.
Thanks,
Brian
SM said:#
# What does this do?
#
# #if 1
# include "x.h"
# #endif
#
# I have never seen #if with just a 1.
It does absolutely nothing.
I use them on some cases where I have temporary code I need to turn off
and on, and it's easiest to just keep editting #if 1 to #if 0 to #if 1,
etc.
In case you haven't seen that
#if 0
...
#endif
unconditionally blocks ... from the being passed to the compiler.
tweak said:What does this do?
#if 1
include "x.h"
#endif
I have never seen #if with just a 1.
Thanks,
Brian
# Thanks. Sorry about the typo in the include, should read #include "x.h".
Realized that.
# So it's just a good way to edit code. Never thought about using
# #if for that. Learn something new every day.
I won't claim it's _good_ way, but it is a way.
What does this do?
#if 1
include "x.h"
#endif
I have never seen #if with just a 1.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.