C++ beginner’s guide. chapter 1: c++ fundamentals

Module 1

C++ Fundamentals Table of Contents

CRITICAL SKILL 1.1: A Brief History of C++
CRITICAL SKILL 1.2: How C++ Relates to Java and C#
CRITICAL SKILL 1.3: Object-Oriented Programming
CRITICAL SKILL 1.4: A First Simple Program
CRITICAL SKILL 1.5: A Second Simple Program
CRITICAL SKILL 1.6: Using an Operator
CRITICAL SKILL 1.7: Reading Input from the Keyboard Project 1-1 Converting Feet to Meters
CRITICAL SKILL 1.8: Two Control Statements
CRITICAL SKILL 1.9: Using Blocks of Code Project 1-2 Generating a Table of Feet to Meter Conversions
CRITICAL SKILL 1.10: Introducing Functions
CRITICAL SKILL 1.11: The C++ Keywords
CRITICAL SKILL 1.12: Identifiers

If there is one language that defines the essence of programming today, it is C++. It is the preeminent language for the development of high-performance software. Its syntax has become the standard for professional programming languages, and its design

philosophy reverberates throughout computing.

C++ is also the language from which both Java and C# are derived. Simply stated, to be a professional programmer implies competency in C++. It is the gateway to all of modern programming.

The purpose of this module is to introduce C++, including its history, its design philosophy, and several of its most important features. By far, the hardest thing about learning a programming language is the fact that no element exists in isolation. Instead, the components of the language work together. This interrelatedness makes it difficult to discuss one aspect of C++ without involving others. To help overcome this problem, this module provides a brief overview of several C++ features, including the general form of a C++ program, some basic control statements, and operators. It does not go into too many details, but rather concentrates on the general concepts common to any C++ program.

CRITICAL SKILL 1.1: A Brief History of C++

The history of C++ begins with C. The reason for this is easy to understand: C++ is built upon the foundation of C. Thus, C++ is a superset of C. C++ expanded and enhanced the C language to support object-oriented programming (which is described later in this module). C++ also added several other improvements to the C language, including an extended set of library routines. However, much of the spirit and flavor of C++ is directly inherited from C. Therefore, to fully understand and appreciate C++, you need to understand the “how and why” behind C.

C: The Beginning of the Modern Age of Programming

The invention of C defines the beginning of the modern age of programming. Its impact should not be underestimated because it fundamentally changed the way programming was approached and thought about. Its design philosophy and syntax have influenced every major language since. C was one of the major, revolutionary forces in computing.

C was invented and first implemented by Dennis Ritchie on a DEC PDP-11 using the UNIX operating system. C is the result of a development process that started with an older language called BCPL. BCPL was developed by Martin Richards. BCPL influenced a language called B, which was invented by Ken Thompson and which led to the development of C in the 1970s.

Prior to the invention of C, computer languages were generally designed either as academic exercises or by bureaucratic committees. C was different. It was designed, implemented, and developed by real, working programmers, reflecting the way they approached the job of programming.



C++ beginner’s guide. chapter 1: c++ fundamentals