C and C++ Programming Resources

Custom Search

Tutorials

More on Encapsulation

Posted on September 10th, 2008 0 Comments

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 another C++ data construct, all of these things are...
Read More | Make a Comment

Generic containers

Posted on September 10th, 2008 1 Comment

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...
Read More | Make a Comment

Multiple Inheritance in C++

Posted on September 10th, 2008 2 Comments

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 along with some of the expected future directions...
Read More | Make a Comment

Constructors in C++

Posted on September 10th, 2008 19 Comments

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 initializations of the different declared member variables of its object. Unlike some of...
Read More | Make a Comment

Exception Handling

Posted on September 10th, 2008 0 Comments

Exceptions are the way of flagging unexpected conditions or errors that have occured in C++ program. Exception Mechanism so far we have handled error conditions by using the if statement to test some expressions and then executing specific code to deal with the error. C++ Language provides a good mechanism to tacke these conditions. The exception mechanism uses...
Read More | Make a Comment

Destructors in C++

Posted on September 10th, 2008 2 Comments

As opposed to a constructor, a destructor is called when a program has finished using an instance of an object. A destructor does the cleaning behind the scenes. Like the default constructor, the compiler always create a default destructor if you don’t create one. Like the default constructor, a destructor also has the same name as its object. This time,...
Read More | Make a Comment

Operators Overloading

Posted on September 10th, 2008 19 Comments

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 a class. Operator overloading does not allow to make...
Read More | Make a Comment

Advance Exception handling

Posted on September 10th, 2008 0 Comments

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 handling....
Read More | Make a Comment


Page 6 of 9123456789