During the project I realized that the way I did things didn't exactly compile into machine code similar to what the C++
equivalent would. My initial objective was to get the syntax in C
as close to C++
as possible, and that's what I did, so I'm quite happy. Just thought I should share this since it may be important depending on what you intend to do.
Title | Author | URL | Comments |
---|---|---|---|
Object Oriented Programming in C | Laurent Deniau | http://ldeniau.web.cern.ch/ldeniau/html/oopc/oopc.html | Since I intended to do everything by myself, I really didn't use the library, only the knownledge shared |
The C Object Oriented Programming Library | Shmuel Fine | https://github.com/ShmuelFine/COOP | Since I intended to do everything by myself, I really didn't use the library, only the knownledge shared |
Alternative idioms for inheritance in C | Dan Saks | https://www.embedded.com/alternative-idioms-for-inheritance-in-C/ | This helps understand how C++ works on the backend |
Virtual functions in C | Dan Saks | https://www.embedded.com/virtual-functions-in-c/ | This article gave me the biggest EUREKA moment, really helped me getting things down in order to get the result I wanted |
Reflections on virtual functions in C | Dan Saks | https://www.embedded.com/reflections-on-virtual-functions-in-c/ | Compilation of articles regarding the subject |
OBJECT ORIENTED PROGRAMMING IN C, HOW? | Ianertson | https://www.youtube.com/watch?v=t3BkpZojfVE | Really important, helped me realize how memory works and how I could make things work out the way I wanted |
C overloading | Weberc2 | https://pastebin.com/W5xEytbv | Helped me to have a eureka moment and realize how I should do to make the syntax similar to C++ in C |
Object-Oriented Programming (OOP) in C | Michael Safyan | https://www.codementor.io/@michaelsafyan/object-oriented-programming-in-c-du1081gw2 | First article I found about this subject, really good read |
How I program C | Eskil Steenberg | https://www.youtube.com/watch?v=443UNeGrFoM | Not really focused on OOP, but helps to better understand structs and how to use them efficientely |
These should be a good place to start, but I recommend reading as much as possible regarding the subject, I find it really interesting.
You can also find a bunch of examples of OOP in C in the Linux's source code.