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: | Ragnarok |
|---|---|
| Location: | Dock Sud, Bs As, Argentina |
| Users: | 137 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 147:48:22 |
| Calls: | 15,368 |
| Calls today: | 1 |
| Files: | 20,060 |
| D/L today: |
20 files (2,909K bytes) |
| Messages: | 1,800,358 |