C++ Beginner 24

cpp_020: Multi-Dimensional Arrays vs. Nested std::vector in C++ — Understanding the Basics with Examples

In this tutorial, we explore multi-dimensional collections in C++, including multi-dimensional arrays and nested std::vector structures, which are commonly used to represent data in multiple dimensions, such as matrices or grids.Throughout this tutorial, we will:Introduce multi-dimensional C-style arrays and nested std::vector structures.Demonstrate how to declare and use them with basic example..

C++ Beginner 2025.04.05

cpp_019: Basics of Functions, Methods, Static Methods, and Constructors in C++

This is a beginner-friendly lesson on four key programming ideas: functions, methods, static methods, and constructors. I’ll use the circle and square analogy to make it visual and simple, explain what an object is first, and compare to Python at the end for those familiar with it. No deep OOP yet — just the basics!1. Object (First, for Context)What is an Object?An object is a specific thing in ..

C++ Beginner 2025.04.05

cpp_016: Comparing C-Style Arrays, std::array, and std::vector in C++

1- IntroductionIn previous tutorials, we explored different ways to handle collections in C++. We started with traditional C-style arrays, then introduced the dynamic std::vector, and most recently discussed the modern std::array in cpp_015: STL Array in C++ (https://medium.com/@staytechrich/list/cpp-c-beginner-053ab9a0ecc3).We also examined how these types are passed to functions: C-style array..

C++ Beginner 2025.04.05

cpp_014: Passing Arrays and Vectors to Functions in C++ - Syntax and Examples

IntroductionIn the previous lesson, we explored the differences between arrays and vectors in C++. Now, let’s dive deeper into how to pass arrays and vectors to functions in C++. Passing these data structures to functions is a common task in C++ programming, and understanding the syntax and usage is crucial for writing efficient and modular code.In this lesson, we’ll cover:The syntax for passing..

C++ Beginner 2025.03.09

cpp_014: Exploring Different Types of For Loops in C++ — Range-Based and Reference-Based Loops

IntroductionIn one of the previous lessons (cpp_008: for Loops in C++), we covered the basics of for loops, including their syntax and common use cases. In this lesson, we’ll explore different types of for loops in C++, specifically focusing on range-based for loops and reference-based for loops. These loops provide cleaner, more efficient, and safer ways to iterate over collections like arrays,..

C++ Beginner 2025.03.01