Tag: pointers
All the articles with the tag "pointers".
-
How to Use Pointers in C++: A Complete Beginner's Guide
Updated:Learn how to use pointers in C++ with clear mental models and real code examples. Understand addresses, dereferencing, and why pointers matter, step by step.
-
C++ nullptr vs NULL: What's the Difference (Beginner Guide)
Updated:Learn the difference between nullptr and NULL in C++, why nullptr is safer, and how it fixes a real overload bug. Clear beginner examples with working code.
-
C++ new vs malloc: What's the Difference and Which to Use
C++ new vs malloc explained: new calls constructors and is type-safe, malloc hands you raw memory. Learn the real differences and why new is preferred in C++.
-
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.