C++ Initiation
Let's begin with a simple C++ program that displays a message. Listing 2.1 uses the C++ cout (pronounced cee-out) facility to produce character output. The source code includes several comments to the reader; these lines begin with //, and the compiler ignores them. C++ is case-sensitive; that is, it discriminates between uppercase characters and lowercase characters. This means you must be careful to use the same case as in the examples. For example, this program uses cout. If you substitute Cout or COUT, the compiler rejects your offering and accuses you of using unknown identifiers. (The compiler also is spelling-sensitive, so don't try kout or coot, either.) The cpp filename extension is a common way to indicate a C++ program; ...
Get C++ Primer Plus, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.