Professional Documents
Culture Documents
Concepts
Concepts
c++. It’s a different approach/concept to solve real life problems within c++
language.
Class: as we know class is group of things with similar properties. But in further
detail, we use keyword class in c++ to make a body of lines that contain functions
(member function) and variable (data members) so we could use them when
called.
Object: we create object of class to get access the function written in class.
Data members: variables within class that are used in different functions
Destructor: when you make a destructor within class, it deletes the object you
made and runs the lines within in the destructor. It runs after all the lines in main
function are executed. It has same properties of constructor just a single change
that it has symbol before its name known as Tilde ( ~ ).
Friend function: if a keyword friend is used before declaring function, than that
function becomes friend function and it can access private and protected data
members/variables easily.
4 pilars of oop:
Abstraction: not having the main idea of the information, we just use it it for our
own puposes. Such as data types int, char, float we just use them but don’t know
how they work.