C++ - Size of data types ======================== Public domain ******************************************************************************** #include using namespace std; int main() { cout << "bool: " << sizeof(bool) << endl; cout << "char: " << sizeof(char) << endl; cout << "short: " << sizeof(short) << endl; cout << "int: " << sizeof(int) << endl; cout << "long: " << sizeof(long) << endl; cout << "float: " << sizeof(float) << endl; cout << "double: " << sizeof(double) << endl; return 0; } ******************************************************************************** _BY: Pejman Moghadam_ _TAG: cpp_ _DATE: 2011-05-28 09:07:59_