So I think I've seen before you can allocate memory in C inside a struct so you don't need to do it in when you create a variable. basically
typedef struct Data{
//Any Arbitrary data
char *name;
} Data;
int main(void){
Data* x = (Data*) malloc(sizeof(Data));
}
Is there some way I can do it from inside the struct like:
typedef struct Data{
(Data*) malloc(sizeof(Data));//<---Something to allocate memory?
//Any Arbitrary data
char *name;
} Data;
int main(void){
Data* x;
Data* y;
Data* z;
}