a very looooong integer
-
Hi geeks... I mean guys guys...:laugh: I need to use a very large integer that does not fit in a long. So I attempted using _int64 and the values are at least stored in the declared variable. However if I try to send it to the screen, it gives me this compiler error... error C2593: 'operator <<' is ambiguous Can anyone give me a simple explanation and solution? Is there any other place I need to be aware of where I'll run into trouble if using this data type? Thanks a bunch!!!
-
Hi geeks... I mean guys guys...:laugh: I need to use a very large integer that does not fit in a long. So I attempted using _int64 and the values are at least stored in the declared variable. However if I try to send it to the screen, it gives me this compiler error... error C2593: 'operator <<' is ambiguous Can anyone give me a simple explanation and solution? Is there any other place I need to be aware of where I'll run into trouble if using this data type? Thanks a bunch!!!
knapak wrote: error C2593: 'operator <<' is ambiguous operator << is not defined for __int64. Therefore it has to try and cast it to something else ( which is plainly not going to work BTW ), and it can't decide what it should cast it to, hence the operator is ambiguous. You probably have to define your own operator <<, and I guess then any other STL operation you try to do, that is type specific. Christian Graus - Microsoft MVP - C++
-
Hi geeks... I mean guys guys...:laugh: I need to use a very large integer that does not fit in a long. So I attempted using _int64 and the values are at least stored in the declared variable. However if I try to send it to the screen, it gives me this compiler error... error C2593: 'operator <<' is ambiguous Can anyone give me a simple explanation and solution? Is there any other place I need to be aware of where I'll run into trouble if using this data type? Thanks a bunch!!!
Hello, The __int64 is not supported by the standard, but it is rather compiler specific. The C standard has support for a 64 bit integer:
long long
. See here[^] for more information. You always can write the number in hexadecimal in two steps: first write the upper 32 bits and then the lower 32 bits. :) Behind every great black man... ... is the police. - Conspiracy brother Blog[^]