| A and AB course |
AB course only |
Comment |
NOT part of AP CS C++ subset
|
| not tested, but potentially useful |
| assert |
|
|
| default parameters |
Function overloading can be used instead. |
| typedef |
More useful in C than in C++ when classes are used. |
|
Implement copy constructors, destructors, and operator = |
|
| iomanip (but endl used) |
|
Students and teachers will find manipulators useful in formatting
output, but iomanip will not be tested. |
| stream member functions eof(), good(), bad(), fail(), ignore(),
etc. |
Use while (cin >> x) idiom, or
test return value of getline for end of input. |
| string streams |
Input string streams are useful for parsing lines of data, output
string streams facilitate conversion to string values. |
| get(char &) |
Useful for reading stream input one character at a time. |
| functions in <math.h>, e.g., sin, cos, tan, floor,
ceil |
Many programs require these functions, but their use will not be
tested. |
| functions in <ctype.h>, e.g., isalpha, isdigit,
islower, ispunct, isspace, isupper, tolower, toupper |
Facilitates system independent testing and conversion of characters,
but not tested. |
| constants in <float.h>, DBL_MIN, DBL_MAX |
Can be useful, but will not be tested. |
| command line arguments, argc, argv[ ] |
Can be useful, but will not be tested. |
| operators: comma, ?:, bitwise, sizeof |
|
These operators are not essential. |
| reference variables |
Reference parameters and reference return types are part of the AP
C++ subset, but reference variables are not. |
| inline functions |
Concerns with efficiency at the level of use of inline functions are
not part of the AP course. In general, code will not appear in class declarations
(defaulting to inline). |
| friend classes and functions |
Use public Display/Print member function instead of overloaded operator
<< when overloaded operator << would require use of
"friend". |
| promotion |
Implicit promotion or conversion, especially in parameter passing,
will not be tested. |
| inheritance |
While inheritance is a central theme of object oriented programming,
this topic and its implementation in C++ are not part of the current AP C++ subset. |
| union |
Not necessary in programs studied and implemented in AP courses. |
|
| troublesome and warned against |
| built-in arrays |
|
No need for this given use of templated vector class. The built-in array type is
fraught with problems, e.g., range checking, pointer similarity. Recognition of
limitations makes built-in arrays an interesting topic for study. |
| C-style (char*) strings |
No need for this given the apstring class. |
| goto |
|
Although there are occasions when goto can be
useful, indiscriminate use is dangerous; goto is NOT part of the AP C++
subset. |
| new[ ]/delete[ ] and malloc/free |
|
No need for [ ], (except with built-in arrays) and use new/delete
rather than malloc/free |
| stdio.h |
scanf/printf, etc. NEVER used. |
| &, the address of operator |
Used only in test for aliasing in operator=.
|