|
Subject:
|
Constructor With a Default?
|
|
Posted By:
|
n6532l
|
Post Date:
|
9/17/2003 3:51:24 PM
|
If I have a constructor with a default defined as:
CCandyBox(char* str = "Candy") { ... }
And I define an object without an argument list "CCandyBox myCandyBox;" does this constructor get called?
|
|
Reply By:
|
Ankur_Verma
|
Reply Date:
|
9/18/2003 5:13:48 AM
|
It does get called in this case if that is all you wanna know.
|
|
Reply By:
|
nikolai
|
Reply Date:
|
9/18/2003 2:16:14 PM
|
Technically, yes... but you'll get compiler errors if you have a default constructor defined (one that takes no parameters), or any other constructors whose parameters have default values.
Take care,
Nik http://www.bigaction.org/
|