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?
Printable View
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?
Try long long int ..
It's a 64 bit integer.
http://mahurshi.tripod.com/mainframes.htm
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.
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