Write a C++ Program to #define, #ifdef #else example.
Menu
Turn Mobile View Off
You are here:  
by Dinesh Thakur Category: Object-oriented programming (OOP)

 

#include <iostream.h>
#include<conio.h>
#define Dinesh 10
void main()
{        clrscr();
         #ifdef Dinesh
         cout<<"Hi Dinesh Thakur\n";
         #else
         cout<<"Hi C++ Programming \n";
         #endif
         #ifndef Movis
          cout<<"Movis not defined\n";
          #endif
          getch();

ifdef else example

Dinesh Thakur is a Technology Columinist and founder of Computer Notes and Technology Motivation. Turn Mobile View Off