Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Union and possible undefined behavior
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64 #include <iostream> union U { int i; float f; }; int f( int* pi, float* pf ) { int r = *pi; *pf = 3.14159; return r; } int main() { U u; u.i = 1; std::cout << f( &u.i, &u.f ); }
run
|
edit
|
history
|
help
0
Get parameter type
algorithm_1
Wide string conversion with multibyte chars
Temp 1
hangman
C++ MSVN Compiler Type Check
pitch errors verification for Nowhk
find vs at
Policy class partial specialization inheritance
Structured Member Value Access Using Structure Member Pointer and Variadic Templates