Created
July 8, 2018 13:38
-
-
Save LiuinStein/d1e7347d4ac1e7ea666009890460c1c6 to your computer and use it in GitHub Desktop.
Performs code before the main function has been invoked.
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 <iostream> | |
static int x = []() | |
{ | |
std::cout << "x - Performs before main function" << std::endl; | |
return 0; | |
}(); | |
class y | |
{ | |
public: | |
y() | |
{ | |
std::cout << "y - Performs before main function" << std::endl; | |
} | |
} fuck; | |
int main() | |
{ | |
std::cout << "Performs inside main function" << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment