Advertisement Jump to content


This topic is now archived and is closed to further replies.


C++ Datatypes and OS Datatypes :: C++

This topic is 5888 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. In general, is it more extensible to implement core C++ datatypes in 32bits and 64bits operating system, or should you implement the OS specific datatypes? For example, under Windows you can implement a DWORD (32bits unsigned integer). A DWORD is equal to C++ unsigned long. I would like to know what is most extensible in terms of C++ design and implementation? Lastly, what is the point of an int datatype in 32bits and 64bits OS? In 32bits OS, an int is equal to a long. Thanks, Kuphryn

Share this post

Link to post
Share on other sites
C99 defines exact-size integers in <stdint.h>, letting you specify int16_t, uint8_t ... or uint64_t ... and be sure to get the right size.

The boost library provides that service for C++ in their own <boost/cstdint.hpp>.

int is essentially a legacy from C.

[ Start Here ! | How To Ask Questions The Smart Way | Recommended C++ Books | Free C++ IDE. ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Boost C++ Lib ]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!