Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

C++ Language/Objects/Constructors/InitializationByCopyConstructor

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

"Implicit initialization" (CRType oImp = oCopied;) and "explicit initialization" (CRType oExp(oCopied);) are equivalent in the sense that they both invoke CRType's "copy-constructor". The copy-constructor's signature is CRType::CRType(const CRType& aroCopied). This same copy-constructor will also be called whenever an object is passed-by-value into some function. Additional information about copy-constructors (includes interactive examples)