C/C++

Very Simple and Efficient Student Database

Submitted by DoctorSpeedCode on
The next project will demonstrate advantages of C++, such as: - using typedef - using the #define directive - using simple, short source code to handle apparently large tasks - easy to read code, if you develop your simple programming style The task we are going to accomplish is a simple and efficient student database. Although we have put some amounts (limitations), these can be changed very easily! Furthermore, for the simplicity of the tutorial we only used cin to read data.

Exception Handling in C++

Submitted by moazkhan on

Exception Handling in C++

In this part you will learn: 1. What is an exception? 2. How using exception is useful? 3. How to use exception in a Program? 4. C++ syntax What is exception? In a class there arise many errors, depending upon the type of program handling these errors can be critically important sometimes. Exceptions is the way through which we handle the errors in a class using object oriented approach. Exceptions can occur due to many reasons like if the system has run out of memory or the object is initialized to impossible values.

Polymorphism in C++

Submitted by moazkhan on

Polymorphism in C++

In this part you will learn: 1. Polymorphism 2. C syntax 3. Showing output In this tutorial I will teach you about the concept of Polymorphism in C++. What is a Polymorphism? Polymorphism enables to write programs that process objects of classes (that are part of the same hierarchy) as if they are all objects of the hierarchy’s base class.

Function Templates in C++

Submitted by moazkhan on

Function Templates in C++

In this tutorial you will learn: 1. What are templates? 2. Why to use function templates? 3. How to use template functions in a program? 4. Basic C++ syntax What are templates? Sometime we have a function in which we need to have different data types of input on which we have to perform some operations, this function would obviously return some value.

Friend Functions in C++

Submitted by moazkhan on

Friend functions in C++

In this tutorial you will learn: 1. What are friend functions? 2. Why to use friend functions? 3. How to use friend function in a program? 4. Basic C++ syntax What are friend functions? Friend functions are those functions which can access the private as well as the protected data members of the classes. We can make a function friend of two classes so that this function can use the private and protected member of those classes to produce a specific result.

Over-riding Functions in C++

Submitted by moazkhan on

Over-riding functions in C++

In this tutorial you will learn: 1. What is over-riding of a function? 2. Why to over-riding a function? 3. How to over-ride a function in a program? 4. Basic C++ syntax What is meant by over-riding a function? By over-riding a function it means that we add some extra functionality in the function which is present in the derived class and that function has the name same as that of the base class function.

Operator Overloading in C++

Submitted by moazkhan on

Operator Overloading in C++

In this part you will learn: 1. What is Operator Overloading? 2. How Operator Overloading is useful? 3. How to use Operator Overloading in a Program? 4. C syntax What is Operator Overloading? Operator overloading is the way by which we give the already existing operators like +,-,*,/,, etc a new meaning by increasing their actual functionality.