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 variable then we can declare it as

Here var_type is the […]

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 will be illustrated. Since objects are simply […]

Generic containers

Container classes are the solution to a specific kind of code reuse problem. They are building blocks used to create object-oriented programs?they make the internals of a program much easier to construct. A container class describes an object that holds other objects. Container classes are so important that they were considered fundamental to early object-oriented […]

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 to the language will be discussed in this chapter […]

Operators Overloading

What is Operator Overloading
Operator Overloading enables us to make the standard operators, like +, -, * etc, to work with the objects of our own data types. So what we do is, write a function which redefines a particular operator so that it performs a specific operation when it is used with the object of […]

Advance Exception handling

An exception usually signals an error. Thought it doesn’t always indicate an eror, it can also signal some particularly unusual even in your program that deserves special attention.
Exception & Errors Handling
No mater how good our program is, it always have to be able to handle possible errors. Most applications today contain some form of error […]

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 standard, such as the Boost library. Also, non-standard libraries written […]

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 the difference between static quoted strings and arrays created on the stack and the […]