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: | 127 |
| Nodes: | 16 (0 / 16) |
| Uptime: | 492698:27:04 |
| Calls: | 7,910 |
| Calls today: | 12 |
| Files: | 9,405 |
| U/L today: |
10 files (49,232K bytes) |
| D/L today: |
683 files (348M bytes) |
| Messages: | 401,459 |
| Posted today: | 8 |