Virtual methods & overriding in C++

A few months ago my friend asked me if I could explain a virtual methods in C++. How to use them, how to implement and why are these so important when programming? Today I am going to answer all of these questions. First of all, we use virtual methods during inheritance. We create a pointer of base … Continue reading Virtual methods & overriding in C++

C++ – References & Pointers in functions

Hello again! Today I am going to explain how to use references and pointers during our programming. First of all advantages & disadvanteges: A: - we don't create a copy of our arguments, we work only on a reference or pointer - faster realization and faster compilation in comparison to transfer args through values -we … Continue reading C++ – References & Pointers in functions

C++ Inheritance

While using OOP (Object Oriented Programming) we have to operate on classes, so we create our own class, for example class CFurniture: And then we create another class, which is strictly connected with CFurniture, e.g. CTable: In main() we are going to call the SetType() (to set) and GetType() (to get type) methods: You can see … Continue reading C++ Inheritance