Chapter 2. SETTING OUT TO C++
You will learn about the following in this chapter:
How to create a C++ program
The #include directive
The general format for a C++ program
The main() function
How to use the cout object for output
How to place comments in a C++ program
The newline character \n
How to declare and use variables
How to use the cin object for input
How to define and use simple functions
When you construct a simple home, you begin with the foundation and the framework. If you don't have a solid structure from the beginning, you'll have trouble later filling in the details, such as windows, door frames, observatory domes, and parquet ballrooms. Similarly, when you learn a computer language, you should begin by learning the basic structure for ...
Get The Waite Group's C++ Primer Plus, Third 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.