Overview
In order to explore the ways we organise code, we are going to be switching programming languages to C/C++. So, before we can add new concepts and ideas let’s have a look at how to build C/C++ programs and how to code sequence and data, and control flow in this language.
C/C++
C/C++ refers to two linked programming languages: C and C++. The C language was written to create the Unix operating system, and was named as a successor to the B programming language. C++ extended the features of C, and takes its name from the increment operator (++
). In this guide, we will use the C++ compiler but stick mainly with C features.
As with C#, our goal with C/C++ is not to teach to the language. Instead, our focus is on using the language to demonstrate concepts that will help you learn any language you need. So, we will avoid many of the unique language features of C/C++.
Focus
For this chapter, notice how the concepts remain the same and just the syntax changes…though the syntax will not change much. The main things we will need to review are:
- Building programs with C/C++.
- The main function.
- Naming conventions.
- Syntax.