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

Show parent comment

2

u/Coding-Kitten Jul 18 '26

The concept of writing object oriented code isn't a C++ feature. Using C++ syntax that the C++ compiler accepts but the C compiler rejects is using C++ features, & which, by definition, you do need to pick C++ to do so in as it's invalid C syntax.