Friday 24 February 2012

No, not always. A default constructor is a constructor which takes no arguments, and it exists so that you can create objects of your new class. An example of this is a constructor that takes no parameters:
Class bred
{
public:
Bred(); //default constructor: can be called with no args
};
Another example of a default constructor is one that can take arguments, provided they are given default values: Example:
class Bred{
public
Bred(int i=3, int j=5); //Default constructor: can be called with args
};