问题描述
- 急!用C语言编的一个学生籍贯信息记录簿出现问题
-
用c语言编了一个学生籍贯信息记录簿,发现只要进行一次修改或删除操作,全部信息输出(allselect函数)时,开头就会有学号为-842150451,姓名为屯屯屯屯屯屯,籍贯为屯屯屯屯屯屯的一项,每进行一次就会多出一项,为什么?
能帮忙修改一下吗? 是allselect(全部输出)函数的问题? 还是jgedit(修改)和jgdelete(删除)这两个函数的问题?这是代码的链接:
用vc6编的,默认后缀cpp
帮忙修改一下这段代码吧
解决方案
问题已与他人联系解决
解决方案二:
int 类型没有初始化变量
解决方案三:
Line 18: error: conio.h: No such file or directory//#include "" ->>#include <>
cc1plus: warnings being treated as errors
In function 'void jgnew()':
Line 69: warning: deprecated conversion from string constant to 'char*''
In function 'void jgxmselect()':
Line 89: warning: format '%ld' expects type 'long int*', but argument 2 has type 'int*'
Line 98: error: 'getch' was not declared in this scope//getchar
compilation terminated due to -Wfatal-errors.
解决方案四:
Line 18: error: conio.h: No such file or directory//#include "" ->>#include <>
cc1plus: warnings being treated as errors
In function 'void jgnew()':
Line 69: warning: deprecated conversion from string constant to 'char*''
In function 'void jgxmselect()':
Line 89: warning: format '%ld' expects type 'long int*', but argument 2 has type 'int*'
Line 98: error: 'getch' was not declared in this scope//getchar
compilation terminated due to -Wfatal-errors.
这段不用管的,用vc6打开是没错的,错误不是出在这里,话说真的没人能帮我改一下源代码吗?
解决方案五:
Line 18: error: conio.h: No such file or directory//#include "" ->>#include <>
cc1plus: warnings being treated as errors
In function 'void jgnew()':
Line 69: warning: deprecated conversion from string constant to 'char*''
In function 'void jgxmselect()':
Line 89: warning: format '%ld' expects type 'long int*', but argument 2 has type 'int*'
Line 98: error: 'getch' was not declared in this scope//getchar
compilation terminated due to -Wfatal-errors.
这段不用管的,用vc6打开是没错的,错误不是出在这里,话说真的没人能帮我改一下源代码吗?
解决方案六:
hh!=0 这个判断条件你看看有没有问题,话说每次每次修改后都有随机赋值的现象出现,应该是第一次或者最后一次循环的时候条件控制不对,没有对初始值或者最终值进行设定
解决方案七:
给你的 jgEdit 函数 添加一个参数 FILE * fp, 函数内部去掉 打开的代码, Edit OK,
你的delete 本身代码就存在问题,建议你在看看 单链表的删除操作, 修改一下
解决方案八:
能在源代码的基础上进行修改吗?我已经给出链接了