12 digit number calculation
-
Hi all, I have a difficulty in finding difference between two 12 digit number. my problem is this 9999 9999 9999 - 1111 1111 1111 = 8888 8888 8888. I wish to do this operation. But i couldnt able to store these two 12 digit numbers as a integer. can anyone please suggest me some ideas? Thanks in advance.
Regards, Ram
-
Hi all, I have a difficulty in finding difference between two 12 digit number. my problem is this 9999 9999 9999 - 1111 1111 1111 = 8888 8888 8888. I wish to do this operation. But i couldnt able to store these two 12 digit numbers as a integer. can anyone please suggest me some ideas? Thanks in advance.
Regards, Ram
-
use __int64. __int64 nNum1 = 999999999999; __int64 nNum2 = 111111111111; __int64 nResult = nNum1 - nNum2;
nave
How can i convert sring to _int64? because my "9999 9999 9999" and "1111 1111 1111" is a string. I need to convert these string values to _int64 and do the subtraction. after do the operation, i need to convert the result from _int64 to string. is there any way to do it? Thanks a lot.
Regards, Ram
-
How can i convert sring to _int64? because my "9999 9999 9999" and "1111 1111 1111" is a string. I need to convert these string values to _int64 and do the subtraction. after do the operation, i need to convert the result from _int64 to string. is there any way to do it? Thanks a lot.
Regards, Ram
-
use __int64. __int64 nNum1 = 999999999999; __int64 nNum2 = 111111111111; __int64 nResult = nNum1 - nNum2;
nave
Thanks for your information. I found the function to convert the string value to the _int64. CString str = "999999999999"; _int64 val = _atoi64(str); Thanks again.
Regards, Ram