带头结点的单链表

#include <iostream>using namespace std;struct Node{ int Value; Node *next;};//创建链表Node *CrtNode(int n){ Node *head; //声明头指针head Node *p,*s; int x; head=new Node; //创建头结点由head指向(空的头结点) s=head; cout<<"请输入数字:"<<endl; for(int i=0;i<n;i++) { ...
2011-11-10 16:02 | 阅读 1316 次 | 评论 3 条