Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • Well, the way I understand it, if I don't specify a default, the compiler creates one for me, which I understand to mostly be a bad thing. Commented Nov 6, 2009 at 21:48
  • In some cases a default constructor is required, though. For instance, if you want to have a vector of DateTime objects. Commented Nov 6, 2009 at 21:49
  • Or is that only if there is no other constructors declared, default or not? Commented Nov 6, 2009 at 21:49
  • 1
    @Austin Hyde: No, if you define your own constructors, the compiler will not provide a default constructor. Commented Nov 6, 2009 at 21:50
  • 1
    @Austin: The compiler will create a default constructor if you don't create ANY constructors - but if you make one, it will not generate a default constructor. Commented Nov 6, 2009 at 21:50