Thread: 64 bit

  1. #1
    Registered User stormbringer's Avatar
    Join Date
    Jul 2002

    64 bit

    my programm is going to work on a i386 (32bit) with win2000. So the largest value a variable can holt is 32 bit, with unsigned long. however, i need to wirk with values up to 64bit. how can i do this? i need to be able to access these numbers, calculate with them and so on.

    thanks for help

  2. #2
    Registered User stormbringer's Avatar
    Join Date
    Jul 2002
    i am curently using vc++: is the variable defntn then

    __int64 myvar;

    if i want to keep my code portable, which way would i go? i once read in an assembler book that you can "link" two 32bit registers together. i'm very unsure about that. but it should be possible to define one int as a high part and the other as the lower. (with that we could create 128bit and so on). i just got stuck how to work with that.
    anyway, i think i'll gona use the __int64. but i am interested in the answer on my second question anyways :-)

  3. #3
    Join Date
    Aug 2001
    The best way is to typedef __int64 int64 or something similar.
    You can look at the source code to crafty in

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  2. 64 bit programs
    By learning in forum C++ Programming
    Replies: 17
    Last Post: 05-10-2007, 11:26 PM
  3. A Question About Unit Testing
    By Tonto in forum C++ Programming
    Replies: 2
    Last Post: 12-14-2006, 08:22 PM
  4. Replies: 7
    Last Post: 12-10-2004, 08:18 AM
  5. bit patterns of negtive numbers?
    By chunlee in forum C Programming
    Replies: 4
    Last Post: 11-08-2004, 08:20 AM