There are probably thousands of ways to do it that have been used over the years - probably all "heuristics" of some sort.
Anyway, I have the need in one of my programs to determine whether I am running 32 bit or 64 bit. I am currently using: sizeof(void *) * CHAR_BIT
which works well enough. I'm just curious what others use and if there is any better/"non-heuristic" way to do it.
Anyway, I have the need in one of my programs to determine whether I am running 32 bit or 64 bit. I am currently using: sizeof(void *) * CHAR_BIT
which works well enough. I'm just curious what others use and if there is any better/"non-heuristic" way to do it.
Statistics: Posted by BigRedMailbox — Wed Oct 22, 2025 8:59 pm — Replies 6 — Views 99