Skip to content
UPEEC

Copy Constructor

`T(const T& other)` creates a new object as a copy.

Easy
Comments 0

Called when passing/returning by value and initialising from another object. Needed when a class owns a resource (deep copy).

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.