Constructors that can take arguments are termed as parameterized constructors.
The number of arguments can be greater or equal to one(1).
For example:
<source lang="cpp">
class Example
{
int x, y;
public:
Example();
Example(int a, int b); // Parameterized constructor
};
Example :: Example()
{
}
Example :: Example(int a, int b)
{
x = a;
y = b;
}
</source>
When an object is declared in a parameterized constructor, the initial values have to be passed as arguments to the constructor function. The normal way of object declaration may not work. The constructors can be called explicitly or implicitly. The method of calling the constructor implicitly is also called the ''shorthand'' method.