undef Pre-Processor Directive





This video tutorial explains the #undef pre-processor directive in c++ programming.

You are gonna learn what is the use of #undef pre-processor directive and how to use it in your program in detail with example.

source code for this tutorial

#include <iostream>

#define ANIL 1

using namespace std;

int main()
{


#ifdef ANIL
cout << "hey anil";
#endif // ANIL

#undef ANIL

#ifdef ANIL
cout << "hey anil";
#else
cout << "who r u ";
#endif // ANIL

    return 0;
}

 
Back To Top