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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:43:55+00:00 2026-05-15T18:43:55+00:00

Is there a C++ variant for the long primitive data-type? A C++ long is

  • 0

Is there a C++ variant for the long primitive data-type?
A C++ long is only 4 bytes, while a Java long is 8 bytes.

So: Is there a non-decimal primitive type with a size of 8 bytes in C++?
Maybe with some tricks?

Thanks

  • 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-15T18:43:56+00:00Added an answer on May 15, 2026 at 6:43 pm

    Microsoft Visual C++ defines an __int64 type that’s equivalent to Java’s long. gcc has int64_t. There’s even a long long int type defined in the ISO C99 standard, however according to the standard it’s at least 64 bits wide, but could be wider.

    But apart from the size, there’s also endianness to consider. The Java standard mandates big endian, but with C, endianness is AFAIK always platform-dependant.

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

Sidebar

Related Questions

I would like to know if there is a variant data type in Delphi
Is there a variant of APCs, or some other technique in NT-based Windows OSes,
There are several variant questions on this on SO, but I did not find
Is there a case-insensitive variant of the Bob Jenkins hash function? Generics.Defaults.BobJenkinsHash provides a
If all the types in my boost::variant support the same method, is there a
I'm working on a C++ application to read some data from an Excel file.
A (very long) while ago I regularly used the following code - then on
Is there some limit to what I can select in a range via VBA?
Is there is any variant to create custom UI in Android 2.2 or Android
In Grails, there is a variant how to include local plugin from sources. According

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.