testsizes.cpp

00001 #include <iostream>
00002 
00003 int main()
00004 {
00005 std::cout << "The size of an int is:\t\t" << sizeof(int) << " bytes.\n";
00006 std::cout << "The size of an unsigned int is:\t\t" << sizeof(unsigned int) << " bytes.\n";
00007 std::cout << "The size of a short int is:\t" << sizeof(short int) << " bytes.\n";
00008 std::cout << "The size of a short is:\t" << sizeof(short) << " bytes.\n";
00009 std::cout << "The size of a long int is:\t" << sizeof(long int) << " bytes.\n";
00010 std::cout << "The size of a long is:\t" << sizeof(long) << " bytes.\n";
00011 std::cout << "The size of a char is:\t\t" << sizeof(char) << " bytes.\n";
00012 std::cout << "The size of a unsigned char is:\t\t" << sizeof(unsigned char) << " bytes.\n";
00013 std::cout << "The size of a float is:\t\t" << sizeof(float) << " bytes.\n";
00014 std::cout << "The size of a double is:\t" << sizeof(double) << " bytes.\n";
00015 std::cout << "The size of an long long is:\t\t" << sizeof(long long) << " bytes.\n";
00016 std::cout << "The size of an long long int is:\t\t" << sizeof(long long int) << " bytes.\n";
00017 /*
00018 std::cout << "The size of an int is:\t\t" << sizeof(int) << " bytes.\n";
00019 std::cout << "The size of an int is:\t\t" << sizeof(int) << " bytes.\n";
00020 std::cout << "The size of an int is:\t\t" << sizeof(int) << " bytes.\n";
00021 */
00022 return 0;
00023 }

Generated on Mon Feb 6 14:01:35 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6