ILE C/C++ Programmer's Guide

Choosing Appropriate Data Types

Choosing the appropriate data type can reduce program space requirements and help improve program performance. When choosing data types, consider all the platforms that your code must support. You may not know all the data types and sizes at the beginning of your code design. Because the data types can hold the same size data on various platforms, you can use typedefs, enums, or classes depending on the use of the data type. If possible use short instead of int, and float instead of double. The compiler uses 2 bytes for short, 4 bytes for int, and 8 bytes for double.


[ Top of Page | Previous Page | Next Page | Table of Contents ]