Skip to content

thisisnotdevin/cisc-3142

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

CISC-3142

Chapter 6

Deep constructor

When designing classes that handle dynamic allocated memory, copying can get us in a lot of trouble. That is because shallow copies of the pointer only copies the address of the pointer, it does not copy the contents.

A deep copy will copy the value too, doing so requires to write your own copy constructor and overload assingment operator

Access Modifiers in C++

Also known as Data Hiding, there are 3 types, Public, Private, Protected

Protected image

Private image

Public

Can be accessed anywhere

Constructor Inheritance

image image

an example would be

A(p1,p2)

B(name)

P(int p1, int p2, string name) : A(p1,p2), B(name)

Releases

No releases published

Packages

No packages published

Languages