if endif elif else Conditional Compilation Macros | C++ Video Tutorial

preview_player
Показать описание
In this c++ Video tutorial, you will learn the conditional compilation macros such as #if, #endif, #elif, #else pre processor directives.

You are gonna learn what are conditional compilation macros and what is the use of them, how use themin your program in detail with example.

Learn Programming in HINDI at our youtube channel

Catch us on SocialMedia
Рекомендации по теме
Комментарии
Автор

i don't know why but this dude makes it so easy to understand for me, i've watched thounsands of tutorials about this but this is the first one i understand! Thanks a lot man.

Martin-wzrm
Автор

Awesome teaching
able to understand well
good work
keep going

lathikaran
Автор

#include <iostream>
#define WINDOWS 1
#define MAC 2
#define LINUX 3
#define UBUNTU 4
#define OS 1
#if OS==WINDOWS
#define printIdentity() (std::cout << "You are using a WINDOWS Operating System\n")
#elif OS==MAC
#define printIdentity() (std::cout << "You are using a MAC Operating System\n")
#elif OS==LINUX
#define printIdentity() (std::cout << "You are using a LINUX Operating System\n")
#elif OS==UBUNTU
#define printIdentity() (std::cout << "You are using an UBUNTU Operating System\n")
#endif


int main(){

printIdentity();
system("pause");
return 0;
}

xXZorganStudioXx
Автор

So clear! I don't know what the hell my professor was trying to say!

theuberman
Автор

How can we use this to make our template

shoryasinghal
Автор

In which cases we should use #if #elif #else  and which cases if, else if, else?
 

ThePositievx
visit shbcf.ru