I want to know about the use of #ifdef, #ifndef and #endif and which case, have to used those conditionals and what's the use of it? Whats the difference between the #ifdef and #ifndef?
For eg:
#define MY_Global
#ifdef MY_Global
// write some code (Inside the method)
#endif
or,
#ifdef MY_Global
-(void) customMethod
{
// Do something
}
#endif
Which one is correct, whether it should write only inside method or it does works outside method?. I haven't used this one before. so please Explain me?
Thanks!