Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 6977

C/C++ • Best way to determine "bitted-ness" from a running program?

$
0
0
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.

Statistics: Posted by BigRedMailbox — Wed Oct 22, 2025 8:59 pm — Replies 6 — Views 99



Viewing all articles
Browse latest Browse all 6977

Trending Articles