Код: Выделить всё
struct A{
char data[4];
int num;
};
Код: Выделить всё
A* a = malloc (sizeof(struct A));
read (fd, a, sizeof(struct A));
Подробнее здесь: https://stackoverflow.com/questions/213 ... -to-c-read
Код: Выделить всё
struct A{
char data[4];
int num;
};
Код: Выделить всё
A* a = malloc (sizeof(struct A));
read (fd, a, sizeof(struct A));