
hotman78

hotman78
hotman78 is a Competitive Programmer and Waseda University student.
- 2020-06-30
【gcc拡張】c++でmain関数の前と後に関数を呼ぶ
gcc 拡張により
関数の前に __attribute__((constructor))
を付けると最初に
関数の前に __attribute__((destructor))
を付けると最後に呼ばれます
__attribute__((constructor))
void constructor() {
cin.tie(0);
ios::sync_with_stdio(false);
cout<<fixed<<setprecision(15);
}
とかしておくと便利です clang では使えなかった気がします(調べてないです)