Thread: DataTypes

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    17

    DataTypes

    As a signed long will only allow up to 2 billion odd, without using an unsigned how would you be able to use numbers greater than this?
    Scorpion-ice
    Imperium et Respectus

  2. #2
    Unregistered
    Guest

    Lightbulb Try long long int

    Try long long int ..
    It's a 64 bit integer.






    http://mahurshi.tripod.com/mainframes.htm

  3. #3
    Registered User
    Join Date
    Jul 2002
    Posts
    17
    I was told using a "long long" was bad practice, although it didn't work with my compiler anyway :/

    I have resorted to using a "double" for the time being.
    Scorpion-ice
    Imperium et Respectus

  4. #4
    Unregistered
    Guest

    Unhappy Bad Practice ?

    It is not a bad practice.
    I didn't tell him to use goto did I ?

    by the way, long long is 64 bit, where as double isn't.
    you can use it in occassions where you have to deal
    with very large numbers.

    if long long int doesn't work with your compiler..

    try something like __int64 ..(i am not sure what that is)
    check it out under stdio.h or math.h

    there should be one... TC++ 3 recognizes ... Dev C++ recognizes

    As far as the later versions of Borland C++ are concerned,
    you should use __int64 or something (need to verify)


    http://mahurshi.tripod.com/mainframes.htm

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. storing datatypes (typedefs) inside template class
    By l2u in forum C++ Programming
    Replies: 2
    Last Post: 10-14-2008, 02:49 AM
  2. naming iterators and other datatypes
    By l2u in forum C++ Programming
    Replies: 8
    Last Post: 10-13-2008, 09:21 PM
  3. confusion on use of datatypes!
    By Saimadhav in forum C++ Programming
    Replies: 1
    Last Post: 08-23-2008, 12:38 AM
  4. Replies: 2
    Last Post: 01-10-2005, 11:14 PM
  5. C++ Datatypes and OS Datatypes :: C++
    By kuphryn in forum Windows Programming
    Replies: 1
    Last Post: 12-07-2002, 02:06 PM