悬赏200分!可追加!做一个用链表的基本操作学生信息管理系统!链表真的不会!求大神出现

求大神指教 这是用c语言编写的 基于动态链表的学生成绩管理系统 其中的错误求大神指出_百度知道
求大神指教 这是用c语言编写的 基于动态链表的学生成绩管理系统 其中的错误求大神指出
exit(0););}struct stu *del(struct stu *head){ struct stu *p1.del
\%d&该文件不存在\\ p1=p1-&;%d%s%f&\ printf(&
p2-&););p,&p-&gt,p-&
exit(0);\char name[20];请输入要删除的学号\;n &quot,&head-& switch(n) { case 1;p=p-&t\printf(&quot,&num);p=p-&
printf(&printf(& scanf(&sorce);&#92,&n);
case 4;head=(struct stu*)malloc(len); printf(&quot.out-screen
4;}void df_sc(struct stu *head){ struct stu *p;scanf(&
printf(&quot: df_sc(p);&#92,&quot,len: output_df(p);;%d%s%f&此链表为空\return(head);}
void main(){
struct stu *p;tplease input selct 1--6&struct stu *
while(p1-&printf(&quot,&p-&);),p-&gt,*for(p=head,&\n &;;i++){p=(struct stu*)malloc(len): output_sc(p);n&无法打开文件\%d&};tail=head=p,&head-&}return (head),flag=0;sorce);,&%d%s%f&quot.txt& scanf(&next=p;next,p-&data,&p-&t\
fp=fopen(&
for(p=next)printf(&
case 6; break.out-datafaile\if(head==NULL)printf(&}tail-&))==NULL)
{ printf(&quot.datafaile-screen
6;num,p-& do{n&
fclose(fp),*p2;t\p;int num!=NULL)
case 2,&p-&\);t***********************************************\scanf(&;).creat
2;sorce);n&quot:\void output_sc(struct stu *head){ struct stu *p;for(p=未找到相关信息\
int i=1; tail-&#include&lt!feof(fp)==1)
if((fp=fopen(&t5;
while(;);sorce););
if(fp==NULL)
{ printf(&););else{ p1=n&quot,&head-&;t
欢迎使用学生成绩管理系统
else printf(&quot.txt&quot,&p-&
FILE *t***********************************************\);n&%d%s%f&);
len=sizeof(struct stu);%d %s %f&next=p1-&scanf(&quot.h&
case 5;t1,p-&gt,p-&);t\sorce);,p-&;sorce); break,*p;n;struct stu{int num: p=creat();t3;n&}void output_df(struct stu *head){ struct stu *p; printf(&num,&next)
fclose(fp);n&; printf(&
case 3;at+&n&please input the number of students\
p2=p1; break!=NULL;please input students detials&quot,n!=NULL; tail=p;i&lt: del(p);D;\%d%s%f&r&quot#include&lt,p-&\n&D;stdio,&n),p-&t&#92,&p-&gt: exit(0):\next=NULL; printf(&num==num)
flag=1;}struct stu *creat(){ struct stu *%d&quot.exit
\);n&quot.h& break
编译是提示最后一行有错 求解
提问者采纳
} while(;n&t1;\);
switch(n) {
printf(&next == NULL) {
printf(&%d%s%f&
scanf(&r&;;
case 5;: &未找到相关信息\\sorce);%d& return 0;
printf(&next = NULL;n&);
p = p-&please input students detials\
scanf(&quot.);\n&quot,已经过不完全测试;
exit(0);t5;next .txt&
free(q); fp = fopen(&next-&%d&);); break: &n&
exit(0);} struct stu *creat() { struct stu * while(1) {
int n,s;next)
fprintf(%d%s%f&该文件不存在\); char name[20];stdio,n; } printf(& return(head);此链表为空\),可以运行;} int del(struct stu *head) { struct stu *p;);)) == NULL) {
printf(&quot,& fclose(fp)&#47,p-&t
欢迎使用学生成绩管理系统\);\ for(i = 0;%d %s %f\n&quot,p-&p=p-&\&#92,p-&gt: &quot,麻烦就大了; printf(&S } p =
printf(& FILE *at+&n&t***********************************************\
return 0;num == num) {
q = p-&gt。*/sorce),*p;;
case 2,s; if(fp == NULL) {
printf(&next,& void output_sc(struct stu *head) { struct stu *p,&n);请输入要删除的学号 。代码改动处较多.name.txt&t\);n&n&next-&;} void df_sc(struct stu *head) { struct stu s.sorce);D;
return 1.h&gt: output_df(head).
printf(&n &n& printf(&quot: head = creat();&#92,s; for(p = head-&next-&
printf(&quot.del\t\,*q;t&#92.datafaile-screen
6!= NULL;);
printf(&; scanf(&struct stu {#include &t***********************************************\)!= NULL) {
if(p-& break,&s; struct stu *
case 6;next)
printf(&:&#92.exit\ head = p = (struct stu *)malloc(len);%d&quot,&next = (struct stu *)malloc(len);}.creat
2;#include &lt.out-datafaile&#92.sorce);} void output_df(struct stu *head) { struct stu *p;t3;n& scanf(& while(p-&gt.h&gt,p-&无法打开文件\\p,&n), if(head-&gt,p-&next,&p-&);); } fclose(fp),s;\next = q-& len = sizeof(struct stu);;} void main() {
struct stu *t\ printf(&quot: df_sc(head);\
printf(&t&#92: exit(0);i & printf(&quot,&s: output_sc(head)!feof(fp) ) {
printf(& if((fp = fopen(&quot.num,p-&n&p = p-&sorce);%d %s %f\,&p-&gt:&#92,&num);i++) {
printf(&);please input the number of students ,p-&); FILE * } p-&
case 4: del(head);n&%d %s %f\).out-screen
4;next-&tplease input selct 1--6\
case 3;D,否则;n&n &quot,如果删除的数据刚好是第一个结点时; } for(p = head-&*应该建立有头结点的链表
提问者评价
原来是这样,感谢!
其他类似问题
按默认排序
其他2条回答
&#47,*p2; p1=p1-&scanf(&; 这儿错了
{ if(p1-&gt,&num);next=p1-&);/num==num)
flag=1;if(head==NULL)printf(&此链表为空\next,flag=0;);n&
p2=p1;/这儿少了判断;n&else{ p1=head!=NULL&&;printf(&
p2-&%d&未找到相关信息\
else printf(&请输入要删除的学号\)!flag) /n&quot,如果head是要删除的节点要单独删除
while(p1-&gtstruct stu *del(struct stu *head){ struct stu *p1
填一个分号就好了,while(1)后面没有分号
动态链表的相关知识
您可能关注的推广
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁一个实用的数据库---学生管理系统 编程思路:①: 链表实现 序要求,单 每个节点存储 的信息。②: 创 Education soft system 教育 应用 182万源代码下载-
&文件名称: 一个实用的数据库---学生管理系统
& & & & &&]
&&所属分类:
&&开发工具: Visual C++
&&文件大小: 72 KB
&&上传时间:
&&下载次数: 58
&&提 供 者:
&详细说明:编程思路:①: 使用单链表实现本程序要求,单链表每个节点存储一个学生的信息。②: 创建一个链表类(List),链表类可实现如下功能:创建链表,插入节点,删除节点,编辑节点,显示节点,保存链表信息等功能,读入数据文件等功能(详细说明请查看源代码)。③: 创建一个操作类(Operater),操作类实现如下功能:显示菜单,操作链表。-programming ideas :
: use a single linked list to achieve the procedural requirements of each node-Chain store a student information.
: Creating a List category (List), objectlist can achieve the following functions : Create List, insert nodes, the nodes to delete, edit nodes, nodes showed that the preservation Chain information and other functions, read features such as data files (see detailed description of the source code).
: creating a category of operation (Operater), the operation to achieve the following functional categories : display menu, operation List.
文件列表(日期:~)(点击判断是否您需要的文件,如果是垃圾请在下面评价投诉):
&&学生管理系统&&............\...........\&&............\...........\&&............\...........\main.cpp&&............\...........\&&............\...........\&&............\...........\student.txt&&............\...........\&&............\...........\链表实现--C++版本.dsp&&............\...........\链表实现--C++版本.dsw&&............\...........\链表实现--C++版本.ncb&&............\...........\链表实现--C++版本.opt&&............\...........\链表实现--C++版本.plg&&............\
&[]:不能解压或下载失败
&近期下载过的用户:
&相关搜索:
&输入关键字,在本站182万海量源码库中尽情搜索:
&[] - 这是一个学生成绩管理系统,很不错的!经测试,没有错误,希望对大家有所帮助!
&[] - 关于链表的操作
可支持链表建立,插入,查找,显示
&[] - 关于教学管理的数据库
&[] - 很不错的学生管理系统 很不错的学生管理系统
&[] - 很好的ado与access做的学生管理系统,帮助初学者掌握vc与数据库连接
&[] - JAVA程序设计\《Java课程设计》很不错的综合实验.为学生管理系统塔
&[] - 利用一个链表类实现一个队列类和栈类
&[] - 自己编写了单向链表类,并能够对链表遍历,插入等
&[] - 数据仓库建设参考
&[] - 一个用mfc编程的学生管理系统界面友好,可以对学生成绩添加删除修改查找等功能,可用于小学校的成绩管理 下载
 收藏
该文档贡献者很忙,什么也没留下。
 下载此文档
正在努力加载中...
【毕业论文】用链表与文件实现学生成绩管理系统
下载积分:2000
内容提示:【毕业论文】用链表与文件实现学生成绩管理系统
文档格式:DOC|
浏览次数:1|
上传日期: 07:15:24|
文档星级:
该用户还上传了这些文档
下载文档:【毕业论文】用链表与文件实现学生成绩管理系统.DOC
官方公共微信求大神帮忙做一个数据结构中的单链表 删除的ppt,就做一页就好,急等着交作业呢,跪求!!!_百度知道
求大神帮忙做一个数据结构中的单链表 删除的ppt,就做一页就好,急等着交作业呢,跪求!!!
做好发我qq邮箱,谢谢啦!
提问者采纳
发给你了希望给分啊,很辛苦的
哥,我要的是那种ppt啊,就像幻灯片那样,我们是一人做一页然后最后弄成一个完整的ppt
等着,我做好放映发给你,记得给个赞
必须的,恩恩,谢谢……………………
提问者评价
其他类似问题
单链表的相关知识
按默认排序
其他2条回答
这个我不会啊
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁C++做一个学生成绩管理系统。有建立、输出、查找、插入、删除、释放功能 用链表实现且按学号升序排列_百度知道
C++做一个学生成绩管理系统。有建立、输出、查找、插入、删除、释放功能 用链表实现且按学号升序排列
num &}cout&lt.score.score,(p1-&num))&lt,b; while(strcmp((p-&请输入一个学生学号姓名年龄成绩;score =&gt,b;
strcpy(p-&num), p):&
p-&num,*p; if(head==NULL)
head=p;&lt,;num);& } else {
p1-&next=p;
else p2-&gt.&gt.name &age=b;
strcpy(p-&
return(head);
cin &p1=p1-&&
p-&&next.num); } return(head); } if(strcmp((p-&gt,现在我插入 结果它不按照学号升序排列了;next=NULL;num))&&p1-&
p-&endl.name).age &next=p;b!=NULL) {
student b, *p2,求大神指教为什么以下是我的插入函数student *Insert(student *
if(head==p1)head=p;next=NULL;&&quot,
student *p) {
student *p1;next=p1,(p1-&gt,的信息;
p=new student、存放了学号为我现在建立了一个链表; } p1=
head=Insert(head
提问者采纳
最终执行结果是p1-&gt,插入的结果肯定不会正确,s2)函数只有在s1=s2时才会返回0!=NULL条件才会无效;num);next。如果有疑问;num))&&p1-&gt!=NULL){ p2=p1,(p1-&num),所以如果没有相等条件的话,strcmp(s1,(p1-&gt,;}这个循环不太对;num))&&p1-&gtwhile(strcmp((p-&gt,strcmp((p-&p1=p1-&next指向最后一个节点
可是我的创建链表程序也用的这个Insert函数,我创建时输入的学号就是按升序排的,这是为什么?创建程序如图
你按我说的改下,看看可不可以?我就看出了这一个问题。我看了你的追问,创建时,你是不是输入的本身就是按顺序排列的?如果不是,我也无能为力了,
提问者评价
其他类似问题
学生成绩管理系统的相关知识
按默认排序
其他1条回答
&nbsp.while(&strcmp((p-&next=p1;0&amp.;}其中没考虑( strcmp((p-& )==0;num))&&,同时p1-&0就有效了;p1;&nbsp,(p1-&&nbsp..){;即..,(p1-&gt!=NULL){p2=p1;num);next=p;return&head.;p2-&&&nbsp!=NULL该成p1;&num))&p2-&num);&&&p1=p1-&next=p;next=p1-&p-&gt.(;}&nbsp!=NULL另外 后面的if该为p-&gt...;next,1楼说了 while的判断那无效 在大小判断结果后加上&gt
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 双向链表 的文章

 

随机推荐