r/C_Programming • • Jul 17 '26

C with classes

I'm curious to know: who uses some C++ features when coding in C? And what feature(s) are you using?

29 Upvotes

79 comments sorted by

View all comments

0

u/papertowelroll17 Jul 17 '26

I code in C++ for a living and very rarely do I make classes tbh. I wouldn't rank that high on the list of things that C could use from C++.

Of course classes do enable some things that are essential (smart pointers and the like), but very rarely do I create a new one.

1

u/Disastrous-Team-6431 Jul 18 '26

I use RAII quite a bit, and custom destructors are a godsend for something like vulkan. But that's the only reason I create classes.