Skip to content

Commit

Permalink
adding new material in basic PF folder
Browse files Browse the repository at this point in the history
  • Loading branch information
haiderali780 committed Jan 20, 2023
1 parent e3f63b5 commit c28004c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
Binary file added 00_Basic PF/slides/OOP Lec_1-2.pdf
Binary file not shown.
Binary file added 00_Basic PF/slides/OOP Lec_3-4.pdf
Binary file not shown.
Binary file not shown.
Binary file added 00_Basic PF/slides/struct.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

In C++, `inheritance` allows a new class `(derived class)` to inherit properties and methods of an existing class `(base class)`. This enables code reuse and `abstraction`, making it useful for creating complex systems. The `derived class` can access and use the properties and methods of the base class as if they were its own.

// inheritance 1(photo)

// inheritance-1

## why wee need it👀?

Expand Down Expand Up @@ -84,16 +85,16 @@ c1.print();
### Default constructor
//Inheritance-2(photo)
//Inheritance-2
### parametrize constructor constructor
//Inheritance-3(photo)
//Inheritance-3
### Copy constructor
//Inheritance-4(photo)
//Inheritance-4
### calling Sequence
//Inheritance-5(photo)
//Inheritance-5
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ A `base reference` is a reference variable of a base class type that can refer t
- `Derived pointer` **can't** point to `base object` same in case of `references`
- But if you really want to point derived pointer to base object,so for that that you have to do **Down Casting or Dynamic casting**.`Dynamic casting` will only work correctly in case of pointers for the references there is no way to do it.

//inheritance-6(photo)
//inheritance-6

### Summary

Expand Down

0 comments on commit c28004c

Please sign in to comment.