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: | 101 |
Nodes: | 16 (0 / 16) |
Uptime: | 06:09:04 |
Calls: | 6,125 |
Calls today: | 2 |
Files: | 8,500 |
D/L today: |
2,024 files (915M bytes) |
Messages: | 347,947 |
Posted today: | 6 |