个人中心
我的提问
我的回答
今日任务
我的设置
退出
文档资料
电脑网络
体育运动
医疗健康
游戏
社会民生
文化艺术
电子数码
娱乐休闲
商业理财
教育科学
生活
烦恼
资源共享
其它
歪果仁看中国
爱问日报
精选问答
爱问教育
爱问公益
爱问法律
城市链表 Description 将若干城市的信息,存入一个带头结点的单 链表。结点中的城市信息包括:城市名,城 市的位置坐标。要求能够利用城市名和位置 坐标进行有关查找、插入、删除、更新等操 作 基本要求:(1) 给定一个城市名,返回其位置坐标; (2) 给定一个位置坐标 P 和一个距离 D,返回...
1个回答
#includeclassnode{ *next;};classINnode{ (intx);/*只写了2个方法*/voiddisplay(); *head;classnode*p1,*p2;INnode(){head=NULL;}};voidINnode::insert(intx){if(head...
5个回答
我没有看懂你给的两个模板类的意思 你们准备干什么?
2个回答
估计楼主想要 楼上的写那些函数的具体实现函数代码;
include #include #include typedef struct Number { int data; struct Number *next; }Number; void main() { Number head; Number *p,*q,*t; char input; i...
定义另外一个链表,链表内的字段两个:一个是需要遍历的链表的数据的指针,一个是新链表自身的下一个元素指针 正序遍历链表, 将每一个节点顺序插在新联表的表头 正序遍历新链表,就能实现你要的功能
C语言单链表实现19个功能完全详解http://www.cnblogs.com/lifuqing/archive/2011/08/20/List.html
我觉得这个没有代码显示 应该是无法给你解释的。 希望能帮到你,麻烦点击 好评,祝福你 。
#include #include #define LEN sizeof (struct student) struct student { int num; float score; struct student *next; }; int n;/* n是节点个数 */ struct stud...
这么简单的作业都做不来吗?
单链表的模板类#includetemplateclasslist{ {Tdata;node*next;};node*head; ();~list();voidadd(T&);voidinsert(T&,T&);//insertthesecondparameterafterthefirstparame...
多回贴,赚点分。谁叫我分低呢
改一下new的类型,new字符(或整型。。。)代替new node
任何一个C++编程的书都有呀,找他们的配书光盘。都什么年代了,编程还白手起家呀
#include #include #include struct node { int value; struct node* left; struct node* right; }; typedef struct node NODE; typedef struct node* PNODE; vo...
该程序为多项式的乘法运算,不好意思,除法运算我也不知该怎么做。仅作参考。
这一点请读者务必搞清楚,要不然就可能认为它和上面的选择排序法一样了
"删掉全部结点,释放内存}//==========用尾插入法建立带头结点的单链表===========LinkList CreatListR1(void){char ch[10];LinkList head=(LinkList)malloc(sizeof(ListNode)); //生成头结点Lis...