Can I use the uint64_t type on the x86 system?

Discussion in 'C++' started by Yong.D, Oct 19, 2006.

  1. Yong.D

    Yong.D Guest

    For example:
    uint64_t TX_TAST = 0x0000000400000000;

    Can I use it?

    Best
    Yong.D
     
    Yong.D, Oct 19, 2006
    #1
    1. Advertising

  2. Yong.D

    Jack Klein Guest

    On 18 Oct 2006 18:01:50 -0700, "Yong.D" <> wrote in
    comp.lang.c++:

    > For example:
    > uint64_t TX_TAST = 0x0000000400000000;
    >
    > Can I use it?
    >
    > Best
    > Yong.D


    I don't know, your compiler does. What does it say when you compile a
    source file including the line above? What does your compiler's
    documentation say? Does your compiler provide a header file somewhere
    that provides a macro or typedef that defines unit64_T? If it does,
    have you included it?

    uint64_t is a required type in any C compiler that conforms to then
    1999 or later version of the C language standard. It is not part of
    the C++ language, but some C++ compilers provide it as an extension.

    The real answer is: if your C++ compiler supports this type as an
    extension, and if you include the proper header, then you can use the
    type. Otherwise you cannot.

    --
    Jack Klein
    Home: http://JK-Technology.Com
    FAQs for
    comp.lang.c http://c-faq.com/
    comp.lang.c++ http://www.parashift.com/c -faq-lite/
    alt.comp.lang.learn.c-c++
    http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
     
    Jack Klein, Oct 19, 2006
    #2
    1. Advertising

  3. Yong.D

    Rolf Magnus Guest

    Yong.D wrote:

    > For example:
    > uint64_t TX_TAST = 0x0000000400000000;
    >
    > Can I use it?


    Well, uint64_t is not a standard C++ type. In C99, it is (if supported by
    the compiler) defined as a typedef in stdint.h. Some C++ compilers do have
    that header, too, so the answer is "it depends".
     
    Rolf Magnus, Oct 19, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Richard Cavell

    using uint64_t with GCC

    Richard Cavell, Feb 27, 2005, in forum: C++
    Replies:
    4
    Views:
    17,615
    bachelor
    Feb 27, 2005
  2. Jhy-Chun Wang

    passing uint64_t between python and c++

    Jhy-Chun Wang, Oct 13, 2004, in forum: Python
    Replies:
    1
    Views:
    1,182
    Fredrik Lundh
    Oct 14, 2004
  3. Dom Jackson
    Replies:
    6
    Views:
    408
    Rolf Magnus
    Jun 24, 2007
  4. Dom Jackson
    Replies:
    6
    Views:
    4,141
    Rolf Magnus
    Jun 24, 2007
  5. Bo Persson
    Replies:
    0
    Views:
    391
    Bo Persson
    Aug 23, 2008
Loading...

Share This Page