|
|
Darren New <dne### [at] sanrrcom> wrote:
> or the infamous "#define private public"
Btw, if you *really* want to hide your private variables, there's a
technique used by some:
class MyClass
{
public:
// public functions here
private:
struct Members;
Members* members;
};
If the struct 'Members' is implemented eg. in a static or dynamically
loadable library, ie. you don't have the source code, it's extremely
difficult for anyone to even figure out what members there are in there
or how to access them. Your #define won't help at all here, nor accessing
the object by other means.
You could, of course, take that pointer and start trashing the memory
it's pointing to, but that would be rather pointless. Certainly not useful.
--
- Warp
Post a reply to this message
|
|