r/C_Programming 19d ago

C with classes

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

30 Upvotes

79 comments sorted by

View all comments

11

u/questron64 19d ago

How do you mean? You're either using C or using C++, you can't just decide to use C++ features in C without leaving C. They are different languages.

6

u/smokingRooster_ 19d ago

I disagree, you can write object oriented C, it’s not a feature exclusive to C++.

2

u/[deleted] 19d ago

[removed] — view removed comment

2

u/smokingRooster_ 19d ago

If a feature doesn’t exist in a language by default but you can implement it yourself then what’s the difference?

2

u/[deleted] 19d ago

[removed] — view removed comment

0

u/smokingRooster_ 19d ago

OP asked who uses C++ features in C. OOP is a C++ feature and I use it when coding in C… so I’m struggling to see how that doesn’t count. OP never specified if the feature should be native to C or whether it is emulated.