9 ms·
it's super easy to define an opaque type in c++ - you do it just like you do in c. you don't need to jump through these hoops.
by zabzonk 3y ago
it's super easy to define an opaque type in c++ - you do it just like you do in c. you don't need to jump through these hoops.
- tom_ 3y agoQuite. And in fact, in this specific situation, in C++ you don't need to jump through any hoops at all, because you have the Rational class there already, ready for use. This whole business only exists to provide a C-friendly wrapper for this existing C++ class, along the lines of the one proposed in the article, with a couple of tweaks that I think would improve it.