HOME | First | Next | Previous | Last | Glossary | About | References

# Introduction to Programming with C++

Designing computer programs
Programming concepts
Programming Techniques
Software development tools
Programming on different platforms

Welcome to David Beech's Introduction to C++, a collection of web pages which are designed to help you learn a first computer programming language.

The course is composed of a number of sections. The early sections, Basic Concepts and Further Concepts, introduce concepts which are common to just about every programming language.

If this is your first visit you might like to read the Introduction.

## Designing computer programs

These lessons introduce some tools and techniques which can be used in designing programs which will be written in Third Generation Computer Programming Languages known generally as 3GL's. The lessons should provide a good foundation for a first computer programming course using a 3GL. Even if you don't intend going on to be a computer programmer you will find some useful techniques in this course that will enhance your problem-solving skills.

Read about 3rd Generation Language Program Design.

## Programming concepts

The Concepts segment covers topics like:

- 1 - Getting started: The programming activity and the first program.
- 2 - Variables, data types, arithmetic operators and simple program input.
- 3 - Decisions and Iteration in C++.
- 4 - Functions, Function arguments, Standard functions.
- 5 - Data types, modifiers and more arithmetic operators
- 6 - Single and multi-dimension arrays.
- 7 - Scope and classes of storage
- 8 - The C++ Preprocessor
- 9 - The power of the C++ string class
- 10 - An introduction to streams
- 11 - An introduction to pointers
- 12 - Functions - passing arguments by reference

  These concepts are fundamental to any programming language and any programming environment.

## Programming techniques

By the time you arrive at this segment you should have established a good foundation in computer programming concepts. You now study:

- 13 - Functions - Default arguments, overloading and variable argument lists
- 14 - Command line arguments
- 15 - Record structures, the struct and the union.
- 16 - Extending the work with streams
- 17 - Introducing Classes and Objects in C++
- 18 - Compounding objects that is, Composite Classes - Part 1
- 19 - Further work with pointers and dynamic objects
- 20 - Inheritance in C++ - Part 1
- 21 - Polymorphism and Virtual Functions
- 22 - Copy constructors, operator overloading
- 23 - Introducing Templates
- 24 - The STL (Standard Template Library)
- 25 - Exception processing - try and catch

  Armed with these techniques you should be ready to pursue solutions to particular classes of programming problems.

## Software development tools

This segment is not necessarily done at some particular step in the process of learning C/C++, it introduces and explains tools that you will use right through the programming activity.

You have already used some programming tools, for example:

- the compiler gcc/g++
- editors like vi, joe, pico and pfe32

In this segment we look at some other programming tools.

- make : a program for maintaining and building programs
- ar : the archiver, a program for building and maintaining libraries
- gdb : the GNU debugger
- gprof
- windres : a resource compiler for Windows programs

## Programming on different platforms

A platform is a computer system, ie its hardware, operating system, utilities etc. You know that C/C++ is available for many different platforms. For example all variants of UNIX, Microsoft Windows platforms, Apple platforms.

A problem for all programmers is the portability of programs between platforms. A program written for Windows 95 won't necessarily run on a Linux system, indeed it may not run on other Microsoft systems.

In this segment we look at programming for two different platforms:

- - Windows 95/98 using the Windows API
- - Linux

## Useful references

The following references are the work of many talented people and I claim no credit for this work.

They are placed here so that you can quickly refer to the appropriate material while working through the C/C++ course.

- - Using the GNU tools
- - Using and Porting GNU CC
- - G++ FAQ Frequently asked questions about the GNU C++ compiler
- - ANSI 1997 C++ Public Review Document
- - The GNU C Library
- - The GNU C++ Iostream Library
- - Standard Template Library Programmer's Guide (sgi)
- - GNU Make : A Program for Directing Recompilation
- - Debugging with GDB : The GNU Source-Level Debugger
- - GDB Annotations
- - The GNU Binary Utilities
- - Using ld : The GNU linker
- - The C Preprocessor
- - grep, egrep, fgrep - print lines matching a pattern
- - Using as : The GNU Assembler
- - Using and Porting GNU Fortran

Copyright © 1999 - 2001 David Beech