Created
September 6, 2020 08:30
-
-
Save Privilger/809c40b6b443452e1193d31578fe3155 to your computer and use it in GitHub Desktop.
a code run before main() function.
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> | |
#include <algorithm> | |
#include <memory> | |
#include <string> | |
using namespace std; | |
__attribute((constructor))void before(){ | |
cout << "before main" << endl; | |
} | |
int main(){ | |
cout << "main func" << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment