#include <stdio.h>
typedef struct {
int stat1, stat2, stat3;
} X_type;
void createPlayer(char *X) {
X_type X;
}
int main() {
createPlayer("Foo");
createPlayer("Bar");
return 0;
}
I would like to create a structure ojject based on a string passed to a function. So the above code would create 2 X_type structures called Foo and another called Bar. Is there a way to do this?