Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
MSVC initializer code
// Initializer/finalizer sample for MSVC and GCC/Clang. // 2010-2016 Joe Lowe. Released into the public domain. #include <stdio.h> #include <stdlib.h> #pragma section(".CRT$XCU",read) static void init() { printf("initialize 1\n"); } __declspec(allocate(".CRT$XCU")) static void (*init_)() = init; static void init2() { printf("initialize 2\n"); } __declspec(allocate(".CRT$XCU")) static void (*init2_)() = init2; int main( int argc, char** argv) { printf( "main\n"); return 0; }
run
|
edit
|
history
|
help
0
ㅇㅇ
kkk
c++
vc++ bug?
sample ptr and obj ex
pi
#26
bitfields_msvc
additional layer of indirection
VC++ error LNK2001 with combined use of non-type template parameters