将新节点插入到环形链表中
发布时间
阅读量:
阅读量
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <string.h>
#include <iomanip>
using namespace std;
class list
{
public:
int num,score;
char name[10];
class list *next;
};
typedef struct list node;
typedef node *link;
link findnode(link head,int num)
{
link ptr;
ptr=head;
while(ptr!=NULL)
{
if(ptr->num==num)
return ptr;
ptr=ptr->next;
}
return ptr;
}
全部评论 (0)
还没有任何评论哟~
