jlong to long !
843829Aug 5 2002 — edited Aug 5 2002Hi ;
What casting should I do to jlong inorder to get a proper long representing the same number .
running the next example gives the below resault :
int main()
{
jlong f = 40956436157 ;
unsigned long g = (unsigned long)f ; // my jlongs will always be positive values
cout <<"testing ="<<g<<endl;
return 1 ;
}
resault :
testing =2301730493
(I tried first with simple long casting and I got : -1993236803 )
I understand that the problem must be with the number of bits representing the long type in c++ , but are there any ideas ?
Thanks ;
Adaya .