Tag: C++
All the articles with the tag "C++".
-
Binary Search in C++: Iterative, Recursive, and std::binary_search
Learn binary search in C++ step by step. Write the iterative and recursive versions, avoid the classic off-by-one bugs, and use std::binary_search correctly.
-
Friend Functions in C++: What They Are and When to Use Them
Learn what friend functions and friend classes do in C++, how they access private members, and when using one is the right call instead of a getter method.
-
Function Pointers in C++: A Beginner's Guide with Examples
Learn how function pointers work in C++. Store functions in variables, pass them as arguments, build a callback, and see why std::function is often simpler.
-
Linked Lists in C++: Build One From Scratch (Beginner's Guide)
Learn how linked lists work in C++. Build a singly linked list from scratch with nodes and pointers, insert and delete elements, and know when to use one.