Wrox Press C++ Tutorial


Chapter 1 - Data, Variables and Calculations

The purpose of this tutorial is to give you a swift, basic grounding in C++. In a moment, we'll begin our journey with an introduction to the building blocks of the language. You'll learn how to get data from the keyboard into your programs, and how to get information onto the screen.

From these relatively humble beginnings, you'll progress through many of the other features of C++. They're presented one-by-one, with each new idea explained clearly, and demonstrated with a fully-worked example. By the end of the tutorial, you'll have the knowledge and the confidence to start experimenting for yourself.

As we explore aspects of the language using working examples, you'll have an opportunity to get some practice with the Microsoft Visual C++ Integrated Development Environment (IDE) - you should create a project for each of the examples before you build and execute them. Every project you create in this tutorial will be a Win32 Console Application, and you can find out exactly how to create one of those later on in this chapter.

In this chapter, we'll get down to the essentials of programming in C++. By the end of the chapter you will be able to write a simple C++ program of the traditional form: input - process - output.

In this chapter you will learn about:


© 1998 Wrox Press