Skip to content

Latest commit

 

History

History
86 lines (51 loc) · 1.26 KB

File metadata and controls

86 lines (51 loc) · 1.26 KB

 

 

 

 

 

 

When you construct a variable of a certain data type, you are creating an instance (also: object) of that data type.

 

In the code below an int called 'x' is instanciated.

 


int main() {   int x = 0; }

 

 

 

 

 

 

 

 

 

 

 

 

  1. Bjarne Stroustrup. A tour of C++. 2014. ISBN: 978-0-321-958310. Chapter 11.7.5, page 131: 'Use unique_ptr to refer to objects of polymorphic type'
  2. Bjarne Stroustrup. A tour of C++. 2014. ISBN: 978-0-321-958310. Chapter 11.7.6, page 131: 'Use shared_ptr to refer to shared objects'