123456789101112131415161718192021222324252627282930
... struct linked_list{ int id; string name; double salary; linked_list * pNext; }; linked_list * pMyLinkedList; bool insert(int id, string name, double salary) { linked_list * tmp; tmp = pMyLinkedList; while(tmp) //find place where new node must be added { tmp = tmp->pNext; } tmp = (linked_list*) calloc(1, sizeof(linked_list)); tmp->id = id; tmp->name= name; tmp->salary= salary; tmp->pNext = NULL; } ....