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
define own struct
Type deduction in VC++
3 sayinin toplami
Problem_rstring_1
wcstombs_s wide string conversion with multibyte chars and locale + concatenation
cv5
boost::asyc fail with error C2280: attempting to reference a deleted function
Thing
Default constructor - none defined
fun