|
![](/i/fill.gif) |
Darren New schrieb:
> I'm not sure how to cleanly turn that into a class without wrapping
> every single function. None of those functions take a pointer to your
> own class, so there's a bunch of casting on every creation at a minimum,
> and you have to hope your class is laid out the same as the parent
> struct and all that.
Fun fact about structs in C++: They /are/ classes. Only major difference
(IIRC) being that their members default to "public:".
Classes only start to really diverge from classic C structs when you go
for stuff like virtual methods or multiple inheritance. In the former
case there'll be a few hidden data members that C++ will automatically
add, while in the latter case... heck, I have not the slightest clue :-)
Post a reply to this message
|
![](/i/fill.gif) |