Pointers in C++

We can say the pointer as a variable which holds the memory address of another variable. If one variable contains the address of another variable, the first variable is said to point to the second. Declaring a Pointer If a variable is holding the address of another...

More on Encapsulation

The purpose of this tutorial is to illustrate how to use some of the traditional aspects of C or C++ with classes and objects. Pointers to an object as well as pointers within an object will be illustrated. Arrays embedded within an object, and an array of objects...

Pointer to a Function

An example of using a pointer to a function. It must be pointed out that there is nothing new here, the pointer to a function is available in ANSI-C as well as in C++ and works in the manner described here for both languages. It is not regularly used by most C...

Playing with addresses of variables and their contents

Playing with addresses of variables and their contents: what is done by C with variables, addresses, and values. [sourcecode language=’cpp’] /******************************************************* * MYCPLUS Sample Code – https://www.mycplus.com * *...