Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/karsten-vermeulen-dev/deep-blue-c

C++ code samples and lessons
https://github.com/karsten-vermeulen-dev/deep-blue-c

coding cplusplus education educational educational-software programming programming-challenges programming-exercises programming-language visual-studio

Last synced: about 1 month ago
JSON representation

C++ code samples and lessons

Awesome Lists containing this project

README

        

# Deep Blue C
This repository is an introductory to intermediate-level C++ "course", complete with lessons, code samples, exercises, challenges, and small games. Each folder in the repo comprises the relevant lesson, source code and learning material. Are you ready to dive into the deep blue C?

## Building the source
Whether you clone the repo or directly download the source code, you must generate a working project and environment out of the code and library files provided. You are advised to download and use [CMake](https://cmake.org) to do this. You may wish to use the CMake GUI app or build from the terminal, but whichever method you choose, the CMake source folder is the one you see above, with the _CMakeLists.txt_ file within. Generate the project files into the destination folder of your choice, even if that's the same folder as the source folder. In terms of preferred IDE, mine is the industry-standard [Visual Studio Community 2022](https://visualstudio.microsoft.com/downloads), and with that in mind, the rest of my documentation will reference this IDE only.

## Compiling and running the engine

Once CMake has created the build folder, open the solution via the **DeepBlueC.sln** file. Within Visual Studio, in the _Solution Explorer_, pick the project you want to build/run by right-clicking it and selecting **Set as Startup Project**. Now, build and run the project in either **Debug** or **Release** mode, which you can set in the toolbar above.

## Sponsor me
If the lessons and code I create is useful to you, and you'd like for me to create tons more, then consider [sponsoring me](https://github.com/sponsors/karsten-vermeulen-dev).

## Overview

### Lesson 1: _Getting to know your environment_
In this very first lesson, you will be introduced to the C++ programming language, including where and why it is being used. You will also learn all about Visual Studio, where to download it and how to manage the IDE. Some tips and tricks will be covered to help you become more productive.

### Lesson 2: _Refresh my memory_
This lesson covers variables, fundamental data types, and contiguous blocks of memory known as arrays.

### Lesson 3: _Operator! Express yourself!_
Here, you will discover all the many different operators that come with C++ and learn how to use them to manipulate your variables in memory.

### Lesson 4: _The loop & flow of a program_
In this lesson, you will learn how to branch your application based on different conditions and discover how to repeat commands using a particular loop.

### Lesson 5: _Are you pointing at me?_
Here, you will examine some special types of variables, namely pointers and references, and understand why they are so powerful and where and when they should or should not be used. You will also learn about stack and heap memory and how pointers can allocate space on either.

### Lesson 6: _Make it function!_
In this lesson, you will learn how to break all your code into manageable and reusable blocks of code, known as functions. You will learn the basics of regular functions, including how to pass data to and receive data from them, before discovering recursive functions, function overloading, and function pointers.

### Lesson 7: _The anatomy of a C++ program_
This lesson delves deeper into the entire pipeline of a working C++ program. From preprocessing to final execution, you will examine the different parts that work together to create an application. You will also learn about the Visual Studio project folder structure and debug and release modes.

### Lesson 8: _It is all going OOP from here..._
Here, you will be introduced to Object-oriented programming and gain an overview of encapsulation. You will learn about classes and objects and how they are created and destroyed using constructors and destructors.

### Lesson 9: _Keep your members private_
In this lesson, you will learn all about abstraction and how to create self-contained classes that do not need to expose their inner functionality to the outside world.

### Lesson 10: _To is-a or to has-a, that is the question (Part I)_
In the first part of this double feature, you will focus on containment, composition, and aggregation and discover how these can make one class consist of another, forming a 'has-a' relationship.

### Lesson 11: _To is-a or to has-a, that is the question (Part II)_
In this latter half, you will learn about inheritance and how child classes can derive from their parent classes, forming a special kind of ‘is-a’ relationship.

### Lesson 12: _Transformation time!_
This lesson covers everything there is to know about polymorphism, including what it is, what it’s used for, and how to implement it properly. At the end of this lesson, you will know all about abstract base classes, early and late binding and dynamic casting. What a mouthful!

### Lesson 13: _Operator! Overload yourself!_
Here, you will learn all about operator overloading and how this powerful feature of C++ allows you to make your operators behave in very different ways, in ways that you want them to act.

### Lesson 14: _T.U. Template_
In this lesson, you will discover how to create templatized classes and functions that act as a stencil for your codebase. This is another powerful language feature worthy of mention.

### Lesson 15: _Have you tried the lambda?_
Here, you will learn about handy function objects called lambdas, which allow you to create blocks of reusable code to handle smaller and more complex tasks.

### Lesson 16: _A brief overview of the Standard Library_
In this lesson, you are introduced to the C++ Standard Library and discover briefly what useful tools it offers the everyday programmer.

### Lesson 17: _Some String Theory_
This lesson will cover the Standard Library's std::string class and detail exactly what the class has to offer.

### Lesson 18: _There's a container for that (Part I)_
Here, you will begin a brand new trilogy by learning all about the Standard Library's sequential storage units, namely, vectors, deques, and lists, including how they work and in what situation they would be helpful.

### Lesson 19: _There's a container for that (Part II)_
Your container journey unfolds as you discover associative containers, namely maps and sets, and learn what makes them valuable and where they would typically be implemented.

### Lesson 20: _There's a container for that (Part III)_
The container trilogy closes off with a dive into adaptive containers, namely stacks, queues, and priority queues.

### Lesson 21: _Algorithmic thinking_
In this lesson, you will discover another robust set of Standard Library tools: algorithms. You will learn what algorithms are, what they do, and how they can solve a particular problem.

### Lesson 22: _Let's be smart about this_
This lesson covers unique, shared, and weak pointers.

### Lesson 23: _File it under 'T'_
Here, you will learn all about file handling, starting with reading from and writing to text files. You will investigate different file handling flags, stream operators, and file states.

### Lesson 24: _File it under 'B'_
The final chapter covers a look into binary files and how the internal file pointers can manage raw data in a file. You will both write binary data to and read data from a binary-formatted file so that you can store data in files that a user cannot edit.