ABSTRACT

This chapter introduces the elements of the C++ programming language and briefly discusses the key features of the language. The canonical way to introduce a programming language is to present a “Hello World!” program, which can then be modified to try out various elements of the language. The program implemented in the chapter is, in Microsoft Windows parlance, called a console application, i.e. a program without a graphical user interface, which is invoked from a command window and writes its output to the same. While C++ is a language, which fully supports object–oriented programming, algorithms still need to be implemented using iteration, conditional statements, and the like. The fundamental data types available in C++ are: integers, declared as int; floating point numbers, declared as float or double; booleans, declared as bool; and characters, declared as char. C++ provides a variety of operators to produce the expressions, which make up the program statements.