$ cat t.cpp #include #include union f { char s[32]; double d; } g; int main(int, char **s) { memcpy(g.s, s[1], sizeof(g)); printf("%23.16g\n", g.d); }