c-test/src/struct_test.h

35 lines
706 B
C
Raw Normal View History

2024-11-04 14:44:45 -05:00
// Move structs in here for them to be usable in other files.
// This might work for what I'm trying to do.
// https://www.geeksforgeeks.org/how-to-initialize-char-array-in-struct-in-c/
struct TestStruct {
char *name;
int age;
};
struct structT1_ {
char username[20];
int tag_number;
} structT1;
2024-11-04 14:44:45 -05:00
// Not sure how to use this
#ifdef _TEST
// https://stackoverflow.com/questions/10162152/how-to-work-with-string-fields-in-a-c-struct
typedef struct {
int number;
char *name;
char *address;
char *birthdate;
char gender;
} patient;
patient *create_patient(int number, char *name,
char *addr, char*bd, char sex);
#endif //_TEST
void print_struct();
void new_struct();