468,512 Members | 1,360 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

how to handle big numbers (n x 32 bits)

Hi!!!!!!!!!!!!!!!!!!!!

Please I want to know how to create a variable of 64 bits, and this variable must allow functionality for their shifting. Thanks for your help

Best Regards,
Aug 14 '06 #1
9 3946
Hi Banfa, Thanks for your help, I apreciated, well regarding one of my Question about permutation you told me that for the 64 bits variable I must declare it using the followin instruction, long long K, the thing is that Microsoft Visual c++ does not allow me to do it this way, so could you please tell me how to create this variable, so I can use shifting?
Aug 14 '06 #2
Banfa
9,056 Expert Mod 8TB
That is platform dependent so we can't help without knowing the platform.
Aug 14 '06 #3
Banfa
9,056 Expert Mod 8TB
use

__int64

on microsoft (I may have the number of _ wrong check the help/header files).
Aug 14 '06 #4
So this is intended to be use in both plataform Linux and Windows. Thanks for your help
Aug 14 '06 #5
Banfa
9,056 Expert Mod 8TB
on Linux use

long long

on Windows use

__int64
Aug 14 '06 #6
So this is intended to be use in both plataform Linux and Windows. Thanks for your help
Aug 14 '06 #7
Banfa
9,056 Expert Mod 8TB
Oh and note

long long does not guarantee 64 bits in fact just that

sizeof(long long) >= sizeof(long)

it is just usual for it to be 64 bits.
Aug 14 '06 #8
Banfa
9,056 Expert Mod 8TB
And please reply to posts when talking about the same subject don't create new threads :-)
Aug 14 '06 #9
Thanks for your help, now I Know how.
Aug 14 '06 #10

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Fred Hebert | last post: by
3 posts views Thread by julry | last post: by
17 posts views Thread by Sri | last post: by
29 posts views Thread by Halid Umar A M | last post: by
39 posts views Thread by Frederick Gotham | last post: by
15 posts views Thread by steve yee | last post: by
14 posts views Thread by thehobbit | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.