// shujujiegou.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
typedef struct _entry {
int key;
int data;
char name[20];
struct _entry * next;
} entry, * entry_ptr;
/*
This function inserts an entry into an ordered, singly linked list.
Each entry in the list is a structure that contains an integer key value,
a next pointer, and some other data.
The head of the linked list is saved in a pointer that is stored outside
the list itself. Within the list, the next pointer in each entry points
to the next element in the list. The end of the linked list is denoted
by the next pointer of the last entry being set to NULL.
The order of the list is determined by the key value. Entries with a lower
key value appear earlier in the list.The function is passed a pointer to the
structure that will be inserted as the new entry. The code reads the key value to determine the proper order in the list, sets the next pointer as needed, and does not change any other elements in the structure.
The function is also passed a pointer to the current head of the list, a
nd it returns the new head of the list, because this changes if the new entry needs to be inserted at the head of the list.
*/
entry_ptr insert_linked_list( entry * current_head, entry * new_element)
{
}
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
小弟看得似懂非懂,望大家给帮帮忙,给解释解释要达到的目的也行!!谢谢各位了