0x00 - Introduction

In this series, I’ll be covering the basics of the C++ programming language. This series is intended for people who are new into programming in general, and if you’ve done just a little bit of research before stumbling across this article, you might be asking why you should even start with C++ as your first programming language - most people advise starting with Python, for example. Good question! To make this series more approachable, we will start with C and fluently move towards C++ as we go.
Read more →

0x01 - Development Environment

In this chapter, we will set up the development environment. Now, since every time I use Windows, I feel like Windows is trying to undermine me at every turn, I’m more of a Linux guy. But if the idea of using Linux doesn’t sound too comfortable to you, feel free to use Windows, in which case Visual Studio IDE might be the easiest option. There are countless tutorials on how to get started with Visual Studio, so I won’t go into detail in this respect.
Read more →

0x02 - Hello, World!

Hello World is probably the simplest program you can write in C++: #include <cstdio> int main() { std::printf("Hello, World!\n"); return 0; } If you are in Linux, save this content in a hello-world.cpp file. Open up a terminal and navigate to a destination where you’ve saved the file. For example, if you’ve saved the file on your desktop, type cd ~/Desktop in your terminal, which is like navigating to this folder in your file-browser.
Read more →

0x03 - Ones and zer0es

Let’s say you want to solve a simple math problem in C++. For example, you have two numbers that you want to add together. What you can do is store the numbers in variables and then use the + operator to perform the addition. Now, let’s talk about variables. Just like in math, a variable has a name that can have a value assigned to it. For example: x = 5.
Read more →

0x04 - Arrays

Arrays in C++ An array is a contiguous set of elements stored in memory. Imagine you wanted to store 10 numbers ranging from 1 to 10. You could do it like this: int number0 = 1; int number1 = 2; int number2 = 3; int number3 = 4; int number4 = 5; int number5 = 6; int number6 = 7; int number7 = 8; int number8 = 9; int number9 = 10; You successfully stored 10 numbers in memory, but this isn’t very flexible.
Read more →

0x05 - String Theory

Text in computers I hope I won’t scare you when I tell you that for computers, text is actually just a bunch of numbers. Look at an arbitrary sentence, it’s just comprised of several letters, spaces and some punctuation. But computers only understand numbers, so to work with text, every character has a corresponding number assigned to it. The value of the number depends on the encoding used. Encoding The easiest and also one of the oldest encodings is ASCII which only defines 128 characters, ranging from number 0 up to 127.
Read more →