ive never done many structs ,if my program asks the user to enter a name for a new "member", how would i make
a member with the string they entered?
theres a idea of what i want to do, but OF COURSE doesnt workCode:struct rec { int stuff[6]; char blah; float water; }; char newm[20]; printf("enter name for a new member to add to struct: "); fgets(newm, 20,stdin); struct rec newm; /* i know this wont work for sure, it will create a member named "newm",but how would i make it make a member with the input the user entered? */![]()



LinkBack URL
About LinkBacks



