F
F
Fango2020-12-07 00:31:29
C++ / C#
Fango, 2020-12-07 00:31:29

What does this piece of code (circled) do?

What is obj? Where is this link?
5fcd4d8475969224705248.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2020-12-07
@Fango

This is the copy constructor of the myclass class, it takes as a parameter a constant reference to an instance of the myclass class. Called to create a new instance of a class based on an existing instance of the same class (copy the class).
See details and examples here: https://en.cppreference.com/w/cpp/language/copy_co...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question