As title says, is there any elegant and safe way to determine if architecture is 32bit or 64bit. By elegant, you can think of precise, correct, short, clean, and smart way.
int iedx; __asm { mov eax, 0x80000001; cpuid; mov, iedx,edx; } if (iedx & (1 << 29)) { return 1; } return 0;