L
lancer6238
Hi all,
I'm using gcc version 4.1.2 on a RedHat Enterprise Linux 5 machine.
I'm trying to print out a 64-bit integer with the value 6000000000
using the g++ compiler, and realized that using the format string
"ld" (ell-d) did not work, but "lld" (ell-ell-d) works. My question is
that I thought Unix uses the LP64 data model, so long integers should
be 64-bit. Then why does "ld" not display the 64-bit value correctly?
Also, in Windows (MS Visual Studio 2008), should I use the format
string "Id" (eye-d) to display 64-bit integers?
Thank you.
Regards,
Rayne
I'm using gcc version 4.1.2 on a RedHat Enterprise Linux 5 machine.
I'm trying to print out a 64-bit integer with the value 6000000000
using the g++ compiler, and realized that using the format string
"ld" (ell-d) did not work, but "lld" (ell-ell-d) works. My question is
that I thought Unix uses the LP64 data model, so long integers should
be 64-bit. Then why does "ld" not display the 64-bit value correctly?
Also, in Windows (MS Visual Studio 2008), should I use the format
string "Id" (eye-d) to display 64-bit integers?
Thank you.
Regards,
Rayne