Skip to content
0:00 / 0:00

#c#oop#structs

Simple Object Oriented Programming (OOP) in C

Low Level Devel

11K subscribers • 8 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Linked in the descriptionrockytriton/LLD

Intermediate. Assumes working knowledge.

10K views5 years ago2 recommendations

Programming languagesSoftware designCDesign patternsSoftware architecture

How to implement object-oriented programming patterns in C using structs and function pointers.

This video will cover a simple example of doing object oriented programming with C. The purpose of this video is that we will be using designs like this in some of the low level projects and I want you to be familiar with the concepts rather than me explaining each time it comes up. This video will also help you with linux kernel development as this type of pattern is often used in the linux kernel code base. Discord: discord.gg/fyFYABCVMX Github: github.com/rockytriton/LLD Reddit: reddit.com/r/LowLevelDevel Donate (Paypal/Venmo): rockytriton75@gmail.com Code: github.com/rockytriton/LLD/tree/main/ooc Subreddit: reddit.com/r/LowLevelDevel

Why it's here

2 people recommend this

What people say. Recommended as a clear guide on implementing OOP patterns in C, similar to how it is done in the Linux kernel.

u/Rockytritonin r/C_Programming • Recommends

Simple Object Oriented Programming (OOP) in C

u/Chronomuim_RSAin r/C_Programming • Recommends

Simple Object Oriented Programming (OOP) in ;

u/Lurchi1in r/C_Programming • Mentions

On “How to structure C code? It appears to reward shallow functions and doing everything in the global scope, whereas other languages let you go as deep as you want at no cost.”

> As for globals, I only have one global and that’s a file pointer for writing logs. That's really fine with me, however to expand on that I can much recommend this 20-min video Simple Object Oriented Programming (OOP) in C, this guy builds a simple RasPi OS from ground up and in this latest video he explains how to use the OOP C pattern from the linux kernel by applying it to a little logging subsystem for his project (and it adds only functions and types to the global scope).

u/Rockytritonin r/C_Programming • Mentions

On “How to properly port C++ classes to C?”

Maybe this video will help some? It covers doing some simple OOP in C. Doesn't cover things like inheritance though: [video