typedef s?
typedef struct general3d {
float x;
float y;
float z;
} general3d_t;
typedef general3d position;
typedef general3d velocity;
, - velocity, , 3 , x, y, z. , velocity, position. , general3d , general3d , position, velocity ; / .
EDIT: , .
, struct, , , , , struct s. :
struct point3d {
float x;
float y;
float z;
};
struct person {
float age;
float weight;
float salary;
};
, 3 , , , . , name person, char * point3d. , .
, struct, struct s:
struct point3d {
float x;
float y;
float z;
};
struct person {
point3d position;
float age;
float weight;
float salary;
};
person.position.x;