c-test/src/struct_test.h

36 lines
773 B
C

// 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;
};
// Causes make error by using MinGW on the laptop..
// struct structT1_ {
// char username[20];
// int tag_number;
// } structT1;
// 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();