C langauage, void * char *. , void *, - char * ( - void *)
read(dp->fd, &dirbuf, sizeof(dirbuf))
C , . - , , dirbuf. (, ), , .
Please note that if you are not working with something that is covered by a very strict specification, such split-write binary read / write methods can be used only during one session of the same program or, possibly, between different sessions of the same the same version of the program on the same platform. After you start working with different platforms and / or different versions of code on the same platform, a thing can easily fall apart after changing the format of the data memory.
source
share