the class constructor

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • priya mahajan
    New Member
    • Sep 2006
    • 9

    the class constructor

    Can we say that the class constructor is a function? If yes ,then what would be its return type?
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    It is a function, it has no explicit return type but implicitly it must return void (I guess).

    Comment

    • student
      New Member
      • Sep 2006
      • 3

      #3
      a constructor for a class is nothing but another function and it never has a return type. That's why whenever you use a constructor, you don't mention the return type explicitly

      Comment

      Working...