-
Elysia & Syntax Error - both of your above pieces of code make much more sense to me now :-) I think I'm taking the wrong approach, like there's just one set way of creating a wrapper class - but from what people are saying here there seems to be several.
When I'm finally out of my crappy job and making worthwhile money programming I shall remember all this help you all put in!! It's really appreciated so thanks :-) I don't go to college or anything like that since I couldn't afford it - so you're all acting as my tutors lol. Hopefully one day I'll be in a position to be the helper rather than helpee!!
-
Fortunately for you, college doesn't teach commercially-viable programming skills.
-
The coding world is just packed full of wrappers!
A wrapper is something that makes something else easier to deal with, though there's usually nothing stopping you from just using that other thing directly. They also don't add any functionality beyond the thing they're wrapping. In fact they often expose a reduced set of functionality, jsut to make the underlying thing they're wrapping easier to deal with.
They can wrap another class, or a bunch of classes, or just a bunch of free functions that perhaps belong to some kind of API.
For example, Much of libraries like MFC can be considered to be a bunch of wrappers. A CWindow is really just a wrapper around the HWND data type, plus much of the functionality of the Win32 API made conveniently available as member functions.