is this default constructor

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nickyeng
    Contributor
    • Nov 2006
    • 252

    is this default constructor

    Code:
    ...
    Screen(): Xsize(80) , Ysize(23), myArray(Xsize,Ysize){};
    ...
    is above code a default constructor?

    Thanks in advance
    Nicky Eng
  • DeMan
    Top Contributor
    • Nov 2006
    • 1799

    #2
    I think what is meant by the default constructor, is the constructor with no input parameters. (I could be wrong). I assume that they call it the default constructor, because having not been given any values to use, it defaults all it's necessary variables

    Comment

    • nickyeng
      Contributor
      • Nov 2006
      • 252

      #3
      i wanna know whether the code i displayed, is default constructor or not...

      Nick

      Comment

      • sicarie
        Recognized Expert Specialist
        • Nov 2006
        • 4677

        #4
        Originally posted by nickyeng
        i wanna know whether the code i displayed, is default constructor or not...

        Nick
        Is there more code than that, or is that all you have to go on?

        Comment

        • r035198x
          MVP
          • Sep 2006
          • 13225

          #5
          Originally posted by sicarie
          Is there more code than that, or is that all you have to go on?

          A default constructor is one that can be called with no arguments



          Comment

          Working...