#include <stdlib.h>
#include <stdio.h>
typedef struct node
{
int v;
int q;
struct node *next;
}node;
void sl(int n,node* &p) //传入指针构建链表
{
printf("请输入密码:");
/* node *head,h; //带头节点的 最后连成环(也可以开始就成环)
h.next=NULL;
head=&h;
p=head;
for( int i=1;i<=n;i++)
{
p->next=(node*)malloc(sizeof(node));
p=p->next;
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余4页未读,立即下载