Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PreDir2
//g++ 7.4.0 //Preprocessor Directive Example 2 //this code is created by Rezaul Hoque on November 25,2021;contact: jewelmrh@yahoo.com //note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; #define DEBUG #include <iostream> using namespace std; #define Head(x) #x #ifndef DEBUG #define ID(y) #else #define ID(y)\ if (!(y))\ {\ std::cout<<" Wrong ID!\n";\ std::cout<<" on line : "<<__LINE__;\ } #endif int main() { int x=1; int y; std::cout<<Head(Preprocessor Directive Example#2:); std::cout<<"\n"; std::cout<<"\nEnter ID:\n"; std::cin>>y; ID(y==x); if(y==x) { std::cout<<"Right ID!\n"; } std::cout<<"\n"; return 0; }
run
|
edit
|
history
|
help
0
riemann
pointer
minmax
float precision test
Funny Saying
K edit distance
Backpack with recursion
Test 1(2021)
BinTreeInsert
Kth Smallest Element (with extra space)