Oddly, two computing platforms that both use binary representation of integers might not represent the same number identically. Intel machines, for example, store bytes using the Little Endian architecture, whereas Motorola processors, IBM mainframe computers, SPARC processors, and ARM processors employ the Big Endian scheme. (However, the last two systems can be configured to use either scheme.)
The terms
Jonathan Swift’s book
You, as a software engineer, should understand the word order of the platform you are targeting. Among other things, it affects the interpretation of data transmitted over a network and how data is stored in binary files. In the preceding example, the 2-byte memory pattern 0xABCD would represent the decimal value 52,651 on a Little Endian machine and the decimal value 43,981 on a Big Endian machine.
B. C++ Reserved Words
C++ reserves some words for its own use and for use in C++ libraries. You shouldn’t use a reserved word as an identifier in a declaration. Reserved words come in three categories: keywords, alternative tokens, and C++ library reserved names.
C++ Keywords
Table B.1. C++ Keywords
Alternative Tokens
In addition to keywords, C++ has some alphabetic alternative representations of operators, termed
Table B.2. C++ Reserved Alternative Tokens and Their Meanings
C++ Library Reserved Names
The compiler won’t let you use keywords and alternative tokens as names. There’s another class of forbidden names for which the protection is not as absolute—
The C++ language reserves macro names used in a library header file. If a program includes a particular header file, then you shouldn’t use the names of macros defined in that header (or in headers included by that header file, and so on) for other purposes. For example, if you include the header file
The C++ language reserves names beginning with two underscores or a single underscore followed by an uppercase letter for any use, and it reserves names beginning with a single underscore for use as a global variable. So don’t create names such as __gink or __Lynx in any case and names such as _lynx in the global namespace.
The C++ language reserves names declared with external linkage in library header files. For functions, this includes the function signature (name and parameter list). For example, suppose you have this code:
#include
using namespace std;
In this case, the function signature tan(double) is reserved. That means your program should not declare a function that has this prototype:
int tan(double); // don't do it
This doesn’t match the library tan() prototype, which returns type double, but it does match the signature portion. However, it would be okay to have the following prototype:
char * tan(char *); // ok
That’s because even though it matches the tan() identifier, it doesn’t match the signature.
Identifiers With Special Meaning