Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Data structure alignment
//Title of this code //Compiler Version 18.00.21005.1 for x86 #include <iostream> typedef struct { char a; long b; char c; } Struct1; typedef struct { char a; char c; long b; } Struct2; typedef struct { long b; char a; char c; } Struct3; int main() { std::cout << "sizeof(char)=" << sizeof(char) << std::endl; std::cout << "sizeof(long)=" << sizeof(long) << std::endl; std::cout << sizeof(Struct1) << std::endl; std::cout << sizeof(Struct2) << std::endl; std::cout << sizeof(Struct3) << std::endl; }
run
|
edit
|
history
|
help
0
c++ pure apstraction
reference
MSVC initializer code
Zero length array as a class member
fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
operator/function lookup
Test
find vs at
constmsvc
decltype_lambda