Skip to main content

  | मौसम…

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

411 REFERENCE · Wikibooks

C++ Language/Indirection/SmartPointers/PointerToBaseClass

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

The pointer-type managed by a smart pointer can be a base class of the actual memory allocation (i.e., std::unique_ptr<CRBase> poUnique(new CRDerived);). Additional information about using smart pointers in a class hierarchy (includes interactive examples)