visavadiya hiren wrote:
> default Constructor helps to make an object without parameter.
>  that is a use of constuctor.
>  bye
>  any else send me mail.
>  
> 
> Thomas Hruska <[EMAIL PROTECTED]> wrote:                               
> mandeep_rince wrote:
>  > there is default constructor in class,what is the need for this 
>  > constructor,,,
>  
>  It is usually used to initialize member variables in the class to some 
>  set of default values.  Got an 'int' member variable?  Set it to 0.  Or 
>  1500.  Or whatever makes sense.

Oops.  Didn't read.  _Default_ constructor (not a plain-ol' 
constructor).  The default constructor is provided by the compiler so 
you don't have to make a constructor that takes zero parameters.  So you 
potentially don't have to write a constructor if all the class members 
are classes.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to