-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathObjects.h
More file actions
58 lines (49 loc) · 1017 Bytes
/
Objects.h
File metadata and controls
58 lines (49 loc) · 1017 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#pragma once
#include <stdio.h>
typedef struct location {
float x;
float y;
};
typedef struct job {
int salary;
location pos;
char* description;
};
typedef struct man {
int age;
float size;
char* name;
man* friends[150];
int weight;
int c = 0;
job myjob;
location pos;
};
void printman(man a) {
printf("name : %s", a.name);
printf("\n\n");
printf("age : %i", a.age);
printf("\n\n");
printf("height : %f", a.size);
printf("\n\n");
printf("weight : %i", a.weight);
printf("\n\n");
printf("position x : %f", a.pos.x);
printf("\n\n");
printf("position y : %f", a.pos.y);
printf("\n\n");
printf("job description : %s", a.myjob.description);
printf("\n\n");
printf("salary : %i", a.myjob.salary);
printf("\n\n");
printf("job position x : %f", a.myjob.pos.x);
printf("\n\n");
printf("job position y : %f", a.myjob.pos.y);
printf("\n\n");
printf("-------friends------");
for (int i = 0; i < a.c; i++) {
printf("\n\n");
printf("%s", a.friends[i]->name);
printf("\n\n");
}
}