Networking, Programming and Graphics Tutorials

Multiple Constructors in a class - C++ [1/1]

Type:
Multiple Constructors in a class - C++
Level: Intermediate Networking, Programming and Graphics Tutorials Networking, Programming and Graphics Tutorials 
Multiple Constructors in a class - C++
Date: 2006-Dec-08
Multiple Constructors in a class - C++
Visited: 2230 times
Multiple Constructors in a class - C++
Rating: Multiple Constructors in a class - C++
Multiple Constructors in a class - C++
Author: Alex Plumpton

It is possible to define more than one constructor function in a class. This is known as constructor overloading. The class definition shown in the figure declares three constructors for an integer object.

Multiple Constructors in a class - C++
The first constructor receives no arguments, the seconds receives two integer arguments and the third receives one integer object as argument. The declaration shown in the figure, automatically invokes the first constructor.

Multiple Constructors in a class - C++
Rate this tutorial:                    
Networking, Programming and Graphics Tutorials - Multiple Constructors in a class - C++ [1/1] - Networking, Programming and Graphics Tutorials

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: multiple constructors in a class  How to use parameterized constructors with a class array  constructors + multi level class inheritence + c++  multiple constructors in c++  multiple constructors C++  "C++" "multiple constructors"  C++ multiple constructors  multiple c++ constructors  multiple Constructors in c++  multiple constructors c++  c++ "multiple constructors"  c++ multiple constructors inheritance  c++ multiple constructors tutorial  parameterized constructors in multiple inheritance in c++  Multiple class C++ program  explain the class declaration and class definition in C++  c++ class declaration "in class"  class*> c++  constructors in c++  what are parameterized constructors?