Intro
In this section, we will cover what C++ is and why one might use it.
What is C++?
C++ is a statically typed, multi-paradigm, procedural, object-oriented, generic, functional language.
- Statically typed: the type of a variable is known at compile time. For C++ this means that you as the programmer must specify what type each variable is. (more on types later).
- Multi-Paradigm: There are many features and ways of going about solving problems!
- Procedural: functions in a step-by-step process
- Object Oriented: We can define custom types (classes or structs) with members that are either properties (variables) or actions (functions)
- Generic: We write code that applies broadly to many different data types.
- Functional: We compose programs by writing functions that call other functions
C++ is known for its efficiency, performance, versatility, and widespread use in software infrastructure. It was developed by Bjarne Stroustrup at Bell Labs in the early 1980s as an extension of the C programming language, adding object-oriented features. C++ is a superset of the language C - meaning that virtually any C program is a valid C++. The language provides low-level memory and hardware control like its predecessor C, but with high-level features like classes and smart pointers.
C++ can create pretty much anything! Here are a couple of examples of popular software built with C++:
- Game engines (Unreal Engine)
- Desktop software (Adobe Products)
- Databases (MySQL)
- Embedded systems (displays in your car or on your appliances)
- Used to implement much of our low-level infrastructure like language compilers and virtual machines
It is, however, also known for its steep learning curve and unforgiving syntax.