Click here to Skip to main content
13,086,662 members (61,175 online)
Click here to Skip to main content

Tagged as


2 bookmarked
Posted 8 Sep 2010

32-Bit or 64-bit OS ??

, 19 Sep 2010
In C++ you can use the size of a pointer to work out what sort of process you're running in:bool is_64_bit(){ return sizeof(void *) == 8;}This has got the advantage of being portable and you don't have to call any OS functions.You can do something similar in C - just return...



Compare Revision Minor Date Status Editor
4 - publicly available No 19-Sep-10 9:48 Available Aescleal
3 No 19-Sep-10 9:48 Composing Aescleal
1 No 8-Sep-10 5:32 Composing Aescleal


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior)
United Kingdom United Kingdom
I've been programming since 1985 - starting with Fortran 77, then moving onto assembler, C and C++ in about 1991. I also know enough Java and Python to read code but you probably wouldn't want me writing it.

I've worked in a wide variety of application areas - defense, banking, games and security with the longest stints being in security. I also seem to end up programming devices far too often. This time I'm programming terahertz band body scanners.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170813.1 | Last Updated 19 Sep 2010
Article Copyright 2010 by Aescleal
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid