How to get past the limit of an int?

This is a discussion on How to get past the limit of an int? within the C++ Programming forums, part of the General Programming Boards category; This is the c++ board not the c board. there is no __int64 type in c++ it is a m$ ...

  1. #16
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    This is the c++ board not the c board. there is no __int64 type in c++ it is a m$ extension.Although it may well be a legal extension in C99 that still doesn't help the OP if hes using C++ as I suspect he is due to this board being used rather than the C board.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  2. #17
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    Either way, by your insistance that "it is a m$ extension," you exude an implication that Microsoft is the sole inventor, proprietor, and implementor of the __int64 type, while, in point of fact, there exist multiple C++ compilers with such support, none of which happen to have been authored by Microsoft.

    [edit]
    P.S. Yes, there are oodles of biginteger classes available and yes, one will be present in the next C++ standard with a high degree of certainty, but I challenge you to produce multiple bigfloatingpoint number open source libraries (aside from GMP, of course).
    Last edited by LuckY; 08-07-2005 at 02:51 PM.

  3. #18
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    Thats not what I meant. Daveed mentioned __int64 for MSVC. Cant remember what the corresponding type is on most other compilers. Seem to remember borlands was _int64 but not sure. Its long long on gcc. The point was simply that by using it you end up with either brittle source or unportable source whereas the library will work the same on any compiler that can compile it. Tho with GMP you need to use gcc or mingw to compile it due to the asm syntax but you can build libs to target msvc.
    As for floating point libs theres a few....
    http://www.apfloat.org/apfloat/
    http://www.jjj.de/hfloat/
    http://www.cs.unc.edu/Research/HARPOON/mpfun++/
    http://www.ginac.de/CLN/
    http://www.tc.umn.edu/~ringx004/mapm-main.html
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  4. #19
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    Thanks for the links. I tried but was unable to locate such things (other than GMP) when I searched many moons ago.

  5. #20
    Registered User
    Join Date
    Aug 2005
    Location
    HOLLAND
    Posts
    10
    Sorry that i didn't reply for a while, cause i'm in Namibia right now (i live in holland), it's the first internet cafe in a week. I love 28k internet speed . I use VC++, so i think i'll use the _int64 version and maybe if i need an huge float i'll use lucky's class. I think the links are also great but they all need about 5 minutes to load, so i can't really check them out.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. NEED HELP READING FILE and PRINTING
    By geoffr0 in forum C Programming
    Replies: 4
    Last Post: 04-16-2009, 06:26 PM
  2. memory leak
    By aruna1 in forum C++ Programming
    Replies: 3
    Last Post: 08-17-2008, 11:28 PM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 03:39 PM
  4. Converted from Dev-C++ 4 to Dev-C++ 5
    By Wraithan in forum C++ Programming
    Replies: 8
    Last Post: 12-03-2005, 07:45 AM
  5. Quack! It doesn't work! >.<
    By *Michelle* in forum C++ Programming
    Replies: 8
    Last Post: 03-02-2003, 12:26 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21