Type-safe generic data structures in plain-old C?

后端 未结 10 2169
庸人自扰
庸人自扰 2020-12-04 08:23

I have done far more C++ programming than \"plain old C\" programming. One thing I sorely miss when programming in plain C is type-safe generic data structures, which are p

10条回答
  •  执念已碎
    2020-12-04 08:53

    Your option 1 is what most old time c programmers would go for, possibly salted with a little of 2 to cut down on the repetitive typing, and just maybe employing a few function pointers for a flavor of polymorphism.

提交回复
热议问题