O'Reilly logo

C++ Primer, Fourth Edition by Barbara E. Moo, Josée Lajoie, Stanley B. Lippman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. Getting Started

CONTENTS

Section 1.1 Writing a Simple C++ Program 2

Section 1.2 A First Look at Input/Output 5

Section 1.3 A Word About Comments 10

Section 1.4 Control Structures 11

Section 1.5 Introducing Classes 20

Section 1.6 The C++ Program 25

Chapter Summary 28

Defined Terms 28

This chapter introduces most of the basic elements of C++: built-in, library, and class types; variables; expressions; statements; and functions. Along the way, we’ll briefly explain how to compile and execute a program.

Having read this chapter and worked through the exercises, the reader should be able to write, compile, and execute simple programs. Subsequent chapters will explain in more detail the topics introduced here.

Learning a new programming ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required