Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualThe King2

Posted 03 April 2013 - 11:58 AM

Because having value instead of reference/pointer in any function creates a copy of the class object. Which constructor are we overloading again?

 

 

(In case you need further explanation: As we pass X by value, this would create a copy which would invoke the copy constructor - which would create another copy, also invoking the copy constructor, and so on...)


#3The King2

Posted 03 April 2013 - 11:57 AM

Because having value instead of reference/pointer in any function creates a copy of the class object. Which constructor are we overloading again?

 

 

(In case you need further explanation: this would create a copy which would invoke the copy constructor - which would create another copy, also invoking the copy constructor, and so on...)


#2The King2

Posted 03 April 2013 - 11:55 AM

Because having value instead of reference/pointer in any function creates a copy of the class object. Which constructor are we overloading again?


#1The King2

Posted 03 April 2013 - 11:55 AM

Because having value instead of reference creates a copy of the class object. Which constructor are we overloading again?


PARTNERS