Peter Rundle wrote:

> Compiled on a Dec Alpha running OpenVMS 7.2
> 
> VMS>run test.exe
> size of a char is 1
> size of a short is 2
> size of a int is 4
> size of a long is 4
> size of a float is 4
> size of a double is 8
> 
> Bit surprised, I expected a long to be 8 but there you go.

Many OSes support both 32 and 64 bit executables. To know
which type your executable is, you should also print 
sizeof(void*) which will always be 8 in a 64 bit executable
and 4 in a 32 bit executable.

If you add a sizeof(void*) to the above I wouldn't be surprised
if you find you have a 32 bit executable and need a command line
option to create a 64 bit executable. Its like this on Solaris
running on Sparc.

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo
+-----------------------------------------------------------+
"The one thing that reading these five books has hammered home is 
how much C++ has turned into 3 languages stuck in a bag fighting 
to get out. Low C++, High C++, and Generic C++."
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to