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/InitializationByOneParameterConstructor

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

A one-parameter-constructor is essentially converting the type of some data (from that parameter's type, into this class type). To prevent client code from unintentionally doing this type-conversion when that client uses implicit-initialization syntax, mark this constructor definition with the explicit keyword. Additional information about a one-parameter-constructor (includes interactive examples)