Object Oriented Programming Notes(C++) OOPs are actually very simple but we can have some difficult questions on OOPs as well. We will first have short notes of theory(which can be asked in form of questions) and then shift to questions.
I am refering E balaguruswamy book for this. These are short notes and may miss something, if you think something is missing please comment. Also, we would be using this track:
1. Introduction to classes and objects
2. Constructors and Destructors
3. Operator Overloading
4. Inheritance
5. Polymorphism
> We will be discussing major topics here and actually difficult ones. **You must know basic OOPs**.
### Introduction
<spoiler summary="C structures Vs C++ Classes">
We know structures can be used to create user-defined data types in C and C++. But then why we need classes? We can have functions, constructors, etc in structures as well but what differentiates it from classes are lack of abstraction and inheritance(And actually many other things as well). We can hide certain...
 in a class but we can't do anything like this in structures.
Also, we cannotoverload an operator, **Let's Overload some Unary and Binary Operators!**, 1. Introduction to classes and objects 2. Constructors and Destructors 3.
Operator Overloading 4, ; im=i; } //Overloading Unary Operator void operator-() { real=-real, Now let's overload a binary operator., Please note that while overloading "<<" operator, we declared our function as a
friend function
Full text and comments »