Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7663773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:07:58+00:00 2026-05-31T14:07:58+00:00

The <cstdint> ( <stdint.h> ) header defines several integral types and their names follow

  • 0

The <cstdint> (<stdint.h>) header defines several integral types and their names follow this pattern: intN_t, where N is the number of bits, not bytes.

Given that a byte is not strictly defined as being 8 bits in length, why aren’t these types defined as, for example, int1_t instead of int8_t? Wouldn’t that be more appropriate since it takes into account machines that have bytes of unusual lengths?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:08:00+00:00Added an answer on May 31, 2026 at 2:08 pm

    On machines that don’t have exactly those sizes the types are not defined. That is, if you machine doesn’t have an 8-bit byte then int8_t would not be available. You would still however have the least versions available, such as int_least16_t.

    The reason one suspects is that if you want a precise size you usually want a bit-size and not really an abstract byte size. For example all internet protocols deal with an 8-bit byte, thus you’d want to have 8-bits, whether that is a native byte size or not.


    This answer is also quite informative in this regards.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background Unfortunately the current C++ standard lacks C99's exact-width types defined in the stdint
Why doesn't C++ have <cstdfloat> header for floats like it has <cstdint> for integers?
I've been using types from cstdint (such as uint32_t) in my code regularly, but
Boost's C99 stdint implementation is awfully handy. One thing bugs me, though. They dump
How can I shift a column in 8x8 area? For example, I have this
I'm really baffled by this. Have I managed to do something to cause this,
#include <cstdint> #include <utility> class SimpleMap { public: typedef std::pair<const uint32_t, const uint32_t> value_type;
I wrote this string copy routine for C strings. It is supposed to behave
In trying to rework my logic in response to this question. I have decided
I've just begun to write my own memory manager, but to do that, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.