C++

Operator overloading! (C++)

Press on this button to view the code on DumanDOCS! Where you can find code examples to support the understanding. Why do we need operator overloading? To make operators work in a way that we want, obviously. Let’s start with the hard ones. Here’s ostream and istream operator overloadings. It may look scary at the Read more…

C++

What’s up with `virtual` keyword? (C++)

Press on this button to view the code on DumanDOCS! Where you can find code examples to support the understanding. Let’s say that we have 2 classes like shown below. Which triangle inherited it’s area property from the quadrilateral class. class quadrilateral { public: quadrilateral() {} virtual ~quadrilateral() {} virtual int area(int Read more…