Software Design Using C++Useful Tables: Precedence Chart, Data Types, and Library FunctionsOperator Precedence ChartWe need to know which operator comes first when writing arithmetic expressions in our C++ programs. The most common arithmetic operators follow the same precedence rules as in algebra. However, C++ includes additional operators not found in ordinary algebra. The following table shows many (but not all) of the C++ operators for arithmetic, logical operations, etc. Those with priority 1 are handled before all of those with a larger precedence number. Those with priority 2 come after those with priority 1 but before all of the others. Those with the same priority are generally handled in a left to right fashion. Parentheses can be used to group items so that whatever is inside is handled before other items. If there are parentheses inside of parentheses it is the innermost set of parentheses that is handled first.
Data TypesThere are many data types available in C++, and the programmer can also define new ones by setting up appropriate classes (as covered in the Intermediate and Advanced sections of these Software Design Using C++ web pages. The table below lists many of the data types commonly available to the C++ programmer. Note that you can find more information about most of these types by looking up certain articles in the Visual Studio help system. Also, notice that the "Section" column indicates in what section of these C++ web pages each data type is covered, thus giving a rough idea of the level of difficulty.
Library FunctionsLots of built-in library functions are available for your use. The table below presents summary information about some of the most commonly-used ones. The "header" column indicates what header file (if any) needs to be included in order to use each function. Note that this can vary somewhat from compiler to compiler.
Back to the main page for Software Design Using C++ |