Tag: tutorial
All the articles with the tag "tutorial".
-
C++ String Concatenation: 5 Ways to Join Strings
C++ string concatenation made simple: use +, +=, append(), stringstream, or C++20 format to join strings. Learn which method to pick and the char array gotcha.
-
C++ vector reserve vs resize: What's the Difference?
C++ vector reserve vs resize: reserve allocates capacity without adding elements, resize changes the size. Learn when to use each, with clear examples.
-
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.