CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    George2 is offline Elite Member Power Poster
    Join Date
    Oct 2002
    Posts
    4,468

    Question about Int64.

    Hi, everyone!


    When reading source code of others, I find they often
    use int64 to represent 8-bit integers. I have referenced
    MSDN and find the comments there are not enough.

    Can anyone tell me where can I find reference about this
    topic? Another question, can this data type be used on
    Non-windows platform, for example, Linux?


    Thanks in advance,
    George

  2. #2
    Join Date
    May 2000
    Location
    Phoenix, AZ [USA]
    Posts
    1,347
    Like I have told you repeatedly, do a search through your
    compiler's header files to see how something is #define'd or
    typedef'ed.

  3. #3
    Join Date
    Aug 2002
    Location
    Madrid
    Posts
    4,588
    Paul, you are being a bit unfair here
    The thing is that _int64 is a built-in type for VC++. When you use gcc, it's typedefed according to the platform you use.
    Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
    Supports C++ and VB out of the box, but can be configured for other languages.

  4. #4
    Join Date
    Sep 2002
    Posts
    1,747
    In addition to the previous posts, I will just add that it is not a standard c++ type and is used by some compilers as a dialect extension. Other compilers use long long for this, and it is possible that in some dialects long long is a different size. Some compilers use both long long and _int64, sometimes interchangeably. Because it is not standard, it is not considered portable, but there has been talk of including some type with either of the names above in the next c++ standard revision...
    */*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/

    "It's hard to believe in something you don't understand." -- the sidhi X-files episode

    galathaea: prankster, fablist, magician, liar

  5. #5
    Join Date
    May 2000
    Location
    Phoenix, AZ [USA]
    Posts
    1,347
    Originally posted by Yves M
    Paul, you are being a bit unfair here
    The thing is that _int64 is a built-in type for VC++. When you use gcc, it's typedefed according to the platform you use.
    I don't think that I am. This guy has a history of not doing any
    work to find out the answers to questions. Some others have
    exhibited some emotion at his incessant questions, but maybe I
    should be more political about it.

    Whatever, I'm not going to argue about it; my quarrel is not with
    you, good sir knight.

    --Paul

  6. #6
    George2 is offline Elite Member Power Poster
    Join Date
    Oct 2002
    Posts
    4,468

    Talking

    Thanks, galathaea buddy!

    George

    Originally posted by galathaea
    In addition to the previous posts, I will just add that it is not a standard c++ type and is used by some compilers as a dialect extension. Other compilers use long long for this, and it is possible that in some dialects long long is a different size. Some compilers use both long long and _int64, sometimes interchangeably. Because it is not standard, it is not considered portable, but there has been talk of including some type with either of the names above in the next c++ standard revision...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured