+ 2
C++ Object Oriented Programming Help!
I am having trouble understanding OOP concepts of C++. Is there a good book/ YouTube Video explaining the same. PS. I understand objects and methods and all basic OOP stuff, I am not asking about that
8 Antworten
+ 9
Let's say
Imagine that you need to make a game in which there are, for example, 10 bots. What will you do - you will create variables for each of them, their own functions, methods, in general, the same code will be rewritten 10 times, and if you need to change something, you will do it for all bots which is very inconvenient. And with OOP, you make one class, in which you write all the methods, variables, functions once, and then create 10 instances that inherit everything from the class. And you make changes only to the class, then it will be reflected in all instances. This is actually very convenient and improves productivity.
It mainly follows the DRY rule - Don't Repeat Yourself!!
It is the golden rule of programming....
+ 6
artiste welcome 🙂
+ 3
+ 2
Maybe it can help :-
https://realpython.com/python3-object-oriented-programming/
+ 1
hey, What's parts maby someone here could simplify it for you?
+ 1
see YouTube channel the cherno, c++ playlist
+ 1
go and visit YouTube channel Giraffe Academy
0
D_Stark virtual functions and member initialzers, but now I got it online. Thanks ☺️