krunode
-
typedef struct node{char name[20];struct node *link;}stud; stud * creat(int n) who can explain it for me?the more amply the better
What are the boxes for? xD
Windows Calculator told me I will die at 28. :(
-
typedef struct node{char name[20];struct node *link;}stud; stud * creat(int n) who can explain it for me?the more amply the better
youbo wrote:
who can explain it...
What?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
typedef struct node{char name[20];struct node *link;}stud; stud * creat(int n) who can explain it for me?the more amply the better
node is a structure that looks like a link list node. typedef is used to give it a new name, that is stud. Creat is a function and it's return type is a pointer to stud. This is all, I or anyone else can tell you by looking code above. Please be specific while asking questions.
-
typedef struct node{char name[20];struct node *link;}stud; stud * creat(int n) who can explain it for me?the more amply the better
This is C code and the typedef tells you that you can declare a variable of type “struct node” by simply typing “stud” instead of “struct node”. The “creat” function allocates, and initializes a new “stud”, which will need to be freed latter. Why an “int” is passed to it I have no idea, because it has nothing to do with the “node”, unless “creat” is doing more than just creating a new node. Oh, by the way, the name of the function should be “create” or something similar, because “creat” is an East Indian herb.
INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra