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 5967293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:55:23+00:00 2026-05-22T19:55:23+00:00

I have been pondering on whether or not I should use the typedefs inside

  • 0

I have been pondering on whether or not I should use the typedefs inside <cstdint> or not.

I personally prefer writing uint32_t over unsigned int and int8_t over char etc… since it to me is alot more intuitive.

What do you guys think? Is it a good idea to use the typedefs from <cstdint> or not? Are there any disadvantages?

  • 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-22T19:55:24+00:00Added an answer on May 22, 2026 at 7:55 pm

    Actually, I would suggest using both.

    If you want something that is definitely 32-bits unsigned, use uint32_t. For example, if you are implementing a “struct” to represent an external object whose specification defines one of its fields as 32 bits unsigned.

    If you want something that is the “natural word size of the machine”, use int or unsigned int. For example:

    for (int i = 0 ; i < 200 ; ++i)
        // stuff
    

    The “natural word size of the machine” is going to give you the best performance, both on today’s processors and on tomorrow’s.

    Use “char” if you mean “character”; “char” or “unsigned char” if you mean “byte”. C/C++ lets you access an arbitrary object’s bytes via “char *”, not anything else, strictly speaking.

    Use uint8_t or int8_t if you specifically want an 8-bit integer, similar to uint32_t.

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

Sidebar

Related Questions

I have been using Jquery alot lately an was wondering if I should use
I have been wondering whether I should be using JavaScriptResult? I have read couple
I've been using the is_nan() function (i.e. is-not-a-number) to check whether a variable taken
I've been writing in x86 assembly lately (for fun) and was wondering whether or
I have been pondering about my homework question for a while. I welcome (and
I have been wondering about the reload() function in python, which seems like it
I have been wondering about the performance of regular expression implementations lately, and have
Something I have been wondering about properties for a while. When you are using
Lately i have been wondering if there is a performance difference between repeating the
I've been hacking around with Ruby a little and I have been wondering if

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.