Compiling and Linking Multiple Source Files in C++
To produce an executable file, we must tell the compiler not only where to find our main function but also where to find the definition of the member functions defined by the Sales
Read tutorialTHE TUTORIAL LIBRARY
To produce an executable file, we must tell the compiler not only where to find our main function but also where to find the definition of the member functions defined by the Sales
Read tutorialOften we need to define a set of alternative values for some attribute. A file, for example, might be open in one of three states: input, output, and append. One way to keep track
Read tutorialA typedef definition begins with the keyword typedef, followed by the data type and identifier. The identifier, or typedef name, does not introduce a new type but rather a synonym
Read tutorialC++ programs typically are composed of many files. In order for multiple files to access the same variable, C++ distinguishes between declarations and definitions.
Read tutorialUsing an uninitialized object is a common program error, and one that is often difficult to uncover. The compiler is not required to detect a use of an uninitialized variable, alth
Read tutorialC++ reserves a set of words for use within the language as keywords. Keywords may not be used as program identifiers. Table 1 below lists the complete set of C++ keywords.
Read tutorialSome operators, such as assignment, require that one of their operands be an lvalue. As a result, lvalues can be used in more contexts than can rvalues. The context in which an lva
Read tutorialThere is a more primitive (and less useful) way to handle long strings that depends on an infrequently used program formatting feature: Putting a backslash as the last character on
Read tutorialTwo string literals (or two wide string literals) that appear adjacent to one another and separated only by spaces, tabs, or newlines are concatenated into a single new string lite
Read tutorialAll of the literals we've seen so far have primitive built-in types. There is one additional literalstring literalthat is more complicated. String literals are arrays of constant c
Read tutorialSome characters are nonprintable. A nonprintable character is a character for which there is no visible image, such as backspace or a control character. Other characters have speci
Read tutorialThe number of integral types in C++ can be bewildering. C++, like C, is designed to let programs get close to the hardware when necessary, and the integral types are defined to cat
Read tutorialOne example today. A better developer tomorrow.