Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

offsetof

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 0.12 sec, absolute running time: 0.16 sec, cpu time: 0.01 sec, memory peak: 5 Mb, absolute service time: 0,55 sec 
edit mode |  history  | discussion
Warning(s):
In file included from /usr/include/x86_64-linux-gnu/bits/_G_config.h:19:0,
                 from /usr/include/x86_64-linux-gnu/bits/libio.h:35,
                 from /usr/include/stdio.h:41,
                 from 1487884015/source.cpp:2:
1487884015/source.cpp: In function ‘int main()’:
1487884015/source.cpp:17:47: warning: offsetof within non-standard-layout type ‘A’ is undefined [-Winvalid-offsetof]
     printf("offsetof(A, a) : %zu\n", offsetof(A, a));
                                               ^
1487884015/source.cpp:18:47: warning: offsetof within non-standard-layout type ‘B’ is undefined [-Winvalid-offsetof]
     printf("offsetof(B, b) : %zu\n", offsetof(B, b));
                                               ^
offsetof(A, a) : 8
offsetof(B, b) : 8

    
                
λ
.NET NoSQL database for rapid development