急!求教一个关于c程序 单链表逆置的程序,帮忙看下这个程序,逆置部分怎么运行后只出现第一个节点?

[复制链接]
查看11 | 回复2 | 2012-6-1 11:22:05 | 显示全部楼层 |阅读模式
#include#include#include "malloc.h"//节点定义struct student{long int num;float score;struct student *next;};//创建链表struct student *create(){struct student *head,*tail,*p;float score;int num,size=sizeof(struct student);head = (struct student*)malloc(size);head->next = NULL;...
回复

使用道具 举报

千问 | 2012-6-1 11:22:05 | 显示全部楼层
//逆置单链表void Invert(struct student *head)改为void Invert(struct student *&head)...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行