Tag: pointers
All the articles with the tag "pointers".
-
C++ Reference vs Pointer: What's the Difference?
Learn the differences between C++ references and pointers — syntax, semantics, when to use each, and the rules that govern them. A practical guide for beginners who understand pointers but are confused about references.
-
C++ Segmentation Fault: What It Is and How to Fix It
Learn what causes segmentation faults in C++ and how to fix them. Covers null pointer dereference, array out of bounds, stack overflow, dangling pointers, and how to use AddressSanitizer to find memory bugs.
-
C++ Stack vs Heap Memory: What's the Difference?
Learn the difference between stack and heap memory in C++. This guide explains how each works, when to use new/delete, how memory leaks happen, and what RAII and smart pointers solve.
-
C++ Pass by Value, Reference & Pointer: Complete Guide
Understand C++ pass by value, pass by reference, and pass by pointer with clear examples. Learn when to use each and how they affect performance.