"No man can serve the two masters God and mammon, for then he will love the one
and hate the other or be loyal to the one and despise the other."
POINTERS USAGE IN C++: BEGINNERS TO ADVANCED
Table of Contents
General Introduction
Part 1: Introduction to Pointers in C++
Part 2: Dynamic Memory Allocation and Linkage with Arrays
Part 3: Function Pointers and Deciphering (Long) Pointer Declarations
C++ is a programming language that includes features of both low-level and high-level programming languages. It allows direct access to memory address locations but also provides advanced objext-oriented programming capabilities. It is also backward compatible with C. The flexibility that C++ provides comes with enormous complexity. My purpose in this article is to demystify the complexity that creeps into C++ from pointers. Personally, once I had understood pointers in-depth, learning the rest of what is necessary to be learnt in C++ was very easy.
I have made two major changes since the previous version of the article. C++ syntax is now colour-coded through images and a couple of illustrations have been added to make examples easier to understand. The entire article uses more than a dozen examples to illustrate core concepts. It helps to practice these examples yourself as you read along. The source code is included with the download version. All examples have been tested with GNU C++ compiler v3.4.