07/09/27 11:09:09
>>396 1/2
char *createcs(struct node *list) {
char *cs = 0;
int i = 0;
struct node *p;
for (i = 0, p = list->next; p; i++, p = p->next) continue;
cs = (char *)malloc(sizeof(char) * (i + 1));
for (i = 0, p = list->next; p; i++, p = p->next) cs[i] = p->element;
cs[i] = '\0';
return cs;
}