From 626c2cd921e7442c20ac1be7be0b9ecb44d00c95 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sat, 6 Sep 2014 22:32:49 +0100 Subject: cc examples --- c,cc/padding.cc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 c,cc/padding.cc (limited to 'c,cc/padding.cc') diff --git a/c,cc/padding.cc b/c,cc/padding.cc new file mode 100644 index 0000000..7ac9be7 --- /dev/null +++ b/c,cc/padding.cc @@ -0,0 +1,32 @@ +#include +#include + +using namespace std; + +struct foo { + int a; + string b; + string b1; + int c; + string b2; + string b3; +}; + +struct bar { + int a; + int c; + string b; + string b1; + string b2; + string b3; +}; + +int +main(void) +{ + cout << sizeof(foo) << endl; + cout << sizeof(bar) << endl; + + return 0; +} + -- cgit v1.2.3