+ 5

member function in c.

can we have the object of a class be passed in the member function of the same class. if yes , then how . And if not, why it can't be?

1st May 2020, 8:10 AM
Andrina
3 Réponses
+ 3
A copy constructor seems to be doing what you described. A copy constructor takes an instance then create + initialize a new object by using data from the given instance (as argument). I suggest you to edit your Description with an example, if you meant for something else : )
1st May 2020, 8:25 AM
Ipang
+ 4
Yeah ...you were right ...I had an idea about this but...forgot what was it ...! Thankyou Ipang
7th May 2020, 9:16 AM
Andrina
+ 1
No problem buddy 👌
7th May 2020, 9:25 AM
Ipang