Created
October 15, 2020 23:47
-
-
Save caloni/4561532940f9111deb8ddeb9fd058bbb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <iostream> | |
#define switch(a) auto switch_cmp = a; | |
#define case(a) if( switch_cmp == a ) | |
int main() | |
{ | |
std::string test = "3"; | |
switch(test) | |
{ | |
case("1") | |
{ | |
std::cout << "1\n"; | |
} | |
case("2") | |
{ | |
std::cout << "2\n"; | |
} | |
case("3") | |
{ | |
std::cout << "3\n"; | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment