Redefining private to public is such a cheap trick.... A real programmer will simply take the address of the object and offset into it. Encapsulation is nothing but a compiler contrivance designed to force people into using the proper interfaces.
char* dataPtr = (char*) &dataObj;
unit privVal;
memcpy(&privVal, dataPtr + 4, 2);
| Sysop: | Eric Oulashin |
|---|---|
| Location: | Beaverton, Oregon, USA |
| Users: | 116 |
| Nodes: | 16 (0 / 16) |
| Uptime: | 05:22:11 |
| Calls: | 8,543 |
| Files: | 9,507 |
| D/L today: |
223 files (35,336K bytes) |
| Messages: | 413,163 |