Hello everyone, in this post I will try to explain OOP(object oriented programming) So, lets begin. Object in OOP will commonly have - Constructor - Deconstructor - Namespace - Public variables & functions aka members - Private variables & functions aka members So, the constructor is ran when the object is created, and is supposed to ensure the object will be create correctly. So, lets say you have an object that contains an public int called A, private char called B, and function C. You obviously don't need to do anything with the function, because its already there, but you should intialize the variables to their default values like so: public Object1(){ A = 0; B = 0; } You can also make arguments to the object, which user needs to provide when creating object, like so public Object1(int A, char B){ this.A = A; this.B = B; } So, now for the deconstructor. In this case it doesn't really matter, but deconstructor commonly exists in languages with manual memory management. Because if you didnt deallocated the memory, it would result in memory leak, and that is preety bad. Deconstructors commonly look something like this: public: ~Object1(){ delete[] arrayMember; } So now when thats covered, these were actually only object templates. To actually use the objects, you need to create an instance of it, like this: Object1 object1(10, 20); int A = object1.A; char B = object1.B; So, this is how you make the object instances, and you can also access its members. Now, how could you make an member, that is accessible to all instances, and even from an non instance? This is called a static member, and you can commonly define them with static keyword like this: class Object1{ public static int NonInstanceMember; } And now, you can freelly access the member without its instance like this: int NIM = Object1.NonInstanceMember; These can be used for various purposes. Just make sure to not make them public if you only want the methods inside the instances to access the static variable, because anything could access it! Its also good practice to name object templates(classes), with capped letters, and their instances normally, so like this: ObjectTemplate objectInstance1 objectInstance2 Now what about the namespaces? Namespaces are for organizing bigger codebases, and if you are building private object nobody will ever use, its propably uselless to give it its own namespace. But you can commonly define them like this: namespace User_Utils; // Makes everything below this line be in that namespace namespace User_Utils{ // Makes everything in this braces be inside namespace } Then if you want to access object from different/no namespace, you can simply do User_Utils.SomeObjectTemplate or User_Utils::SomeObjectTemplate Or you can also use it using the using keyword, and then you dont have to type the namespace everytime such as this: using namespace User_Utils or using User_Utils Now, what are private members used for? Well, everything you dont need to be public. So lets say we have a list: class List{ private int[] actualMembers; public void GetMember(){ // Some code here } } So, if you dont want the actual members to be accessed from anywhere, but only trough the GetMember method, you can! You can also make private functions, which can only be called from static functions or normal functions inside the class, like this: class List{ private void PrivateFunction(); // Can call PrivateFunction public void PublicFunction(); // Can call PrivateFunction public static void PublicStaticFunction(); // Can call PrivateFunction if it has the correct instance of the classs private static void PrivateStaticFunction(); // Can call PrivateFunction if it has the correct instance of the classs } int main(); // Cannot call PrivateFunction directly And, thats about it for today! If you have any questions, well I will answer them if you find any contact on me! See yall soon