When I read about C++ I see words like inheritance and polymorphism and immediately go to sleep because there is no meaning defined. |
These terms are the crux of OOP. If you are interested in learning C++, you absolutely must learn what these concepts are. They are extremely powerful tools for the programmer to use. Those terms are soooo central to OOP that they won't be defined unless the the paper/book is geared for beginners. It would be kind of like using the term "loop" or "struct" in a paper for C programmers. Context is not needed unless it's being written for beginners.
A story: I used to work at a strong "C" company that was migrating to C++. I was working on a project where billing information was generated based on the service provider, country, etc.
We started by providing billing information for 1 setup. A few days later we got the go-ahead to generate billing information for a second setup. My coworkers imagined combing through the code and looking for all sorts of places to put in
if (billType == TYPE1){} else if (billType == TYPE2){}
checks to make sure the correct bits were generated for each billing type. This would be a tedious and complex process, especially as more and more setups were added.
They were all surprised when I was able to use the power OOP and come up with a second billing implementation in an afternoon. The original code for the first billing type was completely untouched. Inheritance from a common base class and polymorphic behavior when calling a billing function made this dreaded job simple.
As @jonnin said, it might have been possible to do this with function pointers and pointers to overlapping structures. But the tools that OOP (and C++) provide can be very powerful and cut through a lot of the goofiness.
I am not here arguing that classes and objects are the be-all and end-all of programming. I'm just saying that they are very powerful tools for your toolbox if you decide it's worth it to learn and understand them.
I'm 57, and while not actively contemplating retirement, it's on my radar. I don't know how much bandwidth I would want to spend learning a new programming language right now. You have been programming longer than I've been alive. If you want to better understand C++ and OOP (and I highly recommend you do), you need to invest some time learning about these terms that put you to sleep. And with your decades of programming experience and the habits you've developed, you will have a non-trivial obstacle to overcome when learning the OOP paradigm. Only you can determine if the juice is worth the squeeze. I hope you determine it is.
The learncpp.com site was mentioned above. Alternately, this site has a tutorial that can give some basics on classes. (
https://cplusplus.com/doc/tutorial/ - focus on the topics under "Classes"). The tutorial on this site is not up-to-date on the latest C++ standards, but will be more than sufficient for understanding these basic concepts.
And when you have more questions, we're still here. We look forward to answering sincere questions.