Advertisement
Advertisement
| 05.07.2008 at 06:56AM PDT, ID: 23382745 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: |
struct dList {
char* type;
char* point;
int id;
char* name;
struct dList *next;
};
struct dList *dHead = (struct dList*) NULL;
struct dList *dEnd = (struct dList*) NULL;
struct dList* add(char* type, int id, char* point, char* name) {
struct dList *list;
list = (struct dList*)calloc(1, sizeof(struct dList));
if(dlist == NULL) {
return (struct dList*)NULL;
} else {
strcpy(list->type, type);
list->id = id;
strcpy(list->point, point);
strcpy(list->name, name);
return list ;
}
}
|