[Insight-users] itkIntTypes
michakuhn at gmx.ch
michakuhn at gmx.ch
Wed Jul 14 10:26:51 EDT 2004
Hi,
I expected that sizeof(ITK_INT64) and sizeof(ITK_INT32) yield different
results. Is this the supposed behavior? The following program couldn't
confirm that:
------
#include "itkIntTypes.h"
#include <iostream>
#include <climits>
int main()
{
std::cout << "number of bits per byte: " <<
CHAR_BIT << std::endl;
std::cout << "sizeof(char): " <<
sizeof(char) << std::endl;
std::cout << "sizeof(int): " <<
sizeof(int) << std::endl;
std::cout << "sizeof(long): " <<
sizeof(long) << std::endl;
std::cout << "sizeof(double): " <<
sizeof(double) << std::endl;
std::cout << "sizeof(ITK_UINT64): " <<
sizeof(ITK_UINT64) << std::endl;
std::cout << "sizeof(ITK_INT64): " <<
sizeof(ITK_INT64) << std::endl;
std::cout << "sizeof(ITK_UINT32): " <<
sizeof(ITK_UINT32) << std::endl;
std::cout << "sizeof(ITK_INT32): " <<
sizeof(ITK_INT32) << std::endl;
return 0;
}
-----
The program produced the follwing output:
-----
number of bits per byte: 8
sizeof(char): 1
sizeof(int): 4
sizeof(long): 4
sizeof(double): 8
sizeof(ITK_UINT64): 4
sizeof(ITK_INT64): 4
sizeof(ITK_UINT32): 4
sizeof(ITK_INT32): 4
-----
I compiled the program with Visual Studio 6 on a Windows XP machine with an
AMD Athlon Processor.
Thanks,
Michael
More information about the Insight-users
mailing list