I've seen many times code like this:
void func(){
#define a ...
...
#undef a
}
Is the #undef
necessary at all?
It is not necessary, but the scope of a #define
is global after the line it was defined. It will not obey the function scope, if you are thinking it will.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With