Pointers in C++

The pointer is 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. There are two types of pointer operators; * and &. the & is a unary operator that returns the memory address of its operand.

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...

Multiple Inheritance in C++

C++ version 2.0 was released by AT&T during the summer of 1989, and the major addition to the language is multiple inheritance, the ability to inherit data and methods from more than one class into a subclass. Multiple inheritance and a few of the other additions...

The Standard C++ Library

The 1998 C++ standard consists of two parts: the core language and the C++ standard library; the latter includes most of the Standard Template Library and a slightly modified version of the C standard library. Many C++ libraries exist which are not part of the...

Strings in C++

String in C/C++ is not more than a array of characters. String encapsulates the functionality of traversing, replacing, copying of one character array to another. One of the biggest time-wasters in C is using character arrays for string processing: keeping track of...

Templates in depth

Templates are of great utility to programmers in C++, especially when combined with multiple inheritance and operator overloading. The C++ Standard Template Library (STL) provides many useful functions within a framework of connected templates. As the templates in C++...

Graphics in C Language

In a C program, first step is to initialize the graphics drivers on the computer. This is done using the initgraph() method provided in graphics.h  library. In the next few pages we will discuss graphics.h library in more details. Important functions in graphic.h  library will be discussed in details and samples programs will be provided to show the power of C programming language especially for graphic programming developing graphical user interfaces.

Generic algorithms

Algorithms are at the core of computing. To be able to write an algorithm once and for all to work with any type of sequence makes your programs both simpler and safer. The ability to customize algorithms at runtime has revolutionalized software development. The...

Working with Pointers in C

A pointer is a variable that represents the location of a data item, such as a variable or an array element. Pointers are used frequently in C, as they have a number of useful applications. For example, pointers can be used to pass information back and forth between a function and its reference point. Pointers provide a way to return multiple data items from a function via function arguments to
be specified as arguments to a given function.

C++ and Object Orientation

Object- Oriented Programming (OOP) is an approach to program organization and development that attempts to eliminate some of the pitfalls of conventional programming methods by in incorporating the best of structured programming features with several powerful new...

Introduction to Classes in C++

A class is an organisation of data and functions which operate on them. Data structures are called data members and the functions are called member functions, The combination of data members and member functions constitute a data object or simply an object.

Constructors in C++

A constructor is a special method that is created when the object is created or defined. This particular method holds the same name as that of the object and it initializes the instance of the object whenever that object is created. The constructor also usually holds the initialization of the different declared member variables of its object.