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: | 136 |
| Nodes: | 16 (1 / 15) |
| Uptime: | 02:19:51 |
| Calls: | 8,278 |
| Calls today: | 10 |
| Files: | 9,486 |
| D/L today: |
209 files (82,196K bytes) |
| Messages: | 408,043 |
| Posted today: | 3 |