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
Build char string (multibyte) with wchar
karma legacy "variant" with attr_cast
cv5
std::is_same doesn't check for calling convention
program_solution_3
hangman
Eight Queen
C++ standard library formatted input hexadecimal float without prefix or exponent test case
Enum Class Comparisons
Matrix paths right-down only, going through XY