⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 我的数据结构的实验作业(一个简单的行编辑程序)_数据结构与算法_数据结构算法_c语言_c 语言之家.htm

📁 严蔚民版的数据结构的完整课件
💻 HTM
📖 第 1 页 / 共 3 页
字号:
                              if(p3-&gt;flat==1)<BR>&nbsp;&nbsp; 
                              puts(p3-&gt;string);<BR>&nbsp;saveanddisplay(10);// 
                              将删除后的结果存盘并显示下一页内容(十行)<BR>&nbsp;xiugai=1;<BR>&nbsp;return 
                              0;<BR>}<BR>&nbsp;<BR>int insert()// 
                              插入i命令对应的函数<BR>{<BR>&nbsp;int 
                              hang,i,increhang=1,number=1;<BR>&nbsp;text 
                              *p,*p1,*p2;<BR>&nbsp;xiugai=1;<BR>&nbsp;scanf("%d",&amp;hang);<BR>&nbsp;p=p1=NULL;<BR>&nbsp;for(i=0,p1=head;i&lt;hang-1;i++,p1=p1-&gt;next);// 
                              找到要插入行的前一列<BR>&nbsp;p=(text 
                              *)malloc(sizeof(text));// 
                              为插入行分配空间<BR>&nbsp;p-&gt;flat=1;<BR>&nbsp;p-&gt;next=p1-&gt;next;// 
                              从此行向下四行将插入行插入到链表中<BR>&nbsp;p-&gt;pre=p1;<BR>&nbsp;p1-&gt;next-&gt;pre=p;<BR>&nbsp;p1-&gt;next=p;<BR>&nbsp;p-&gt;string[0]=getchar();<BR>&nbsp;p-&gt;string[0]=getchar();<BR>&nbsp;for(i=1;(i&lt;80)&amp;&amp;(p-&gt;string[i-1]!='^');i++)<BR>&nbsp;{<BR>&nbsp; 
                              p-&gt;string[i]=getchar();<BR>&nbsp; 
                              if((i+1==80)&amp;&amp;(p-&gt;string[i]!='^'))// 
                              如果插入的内容超过一行<BR>&nbsp; 
                              {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                              file:// 的容量,则分配下一行空间<BR>&nbsp;&nbsp; 
                              p1=p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file:// 
                              并将其连入链表<BR>&nbsp;&nbsp; p=(text 
                              *)malloc(sizeof(text));<BR>&nbsp;&nbsp; 
                              p-&gt;flat=1;<BR>&nbsp;&nbsp; 
                              p-&gt;next=p1-&gt;next;<BR>&nbsp;&nbsp; 
                              p-&gt;pre=p1;<BR>&nbsp;&nbsp; 
                              p1-&gt;next-&gt;pre=p;<BR>&nbsp;&nbsp; 
                              p1-&gt;next=p;<BR>&nbsp;&nbsp; 
                              i=0;<BR>&nbsp;&nbsp; increhang++;<BR>&nbsp; 
                              }<BR>&nbsp; 
                              p-&gt;num=i;<BR>&nbsp;}<BR>&nbsp;p-&gt;string[i-1]='\n';<BR>&nbsp;p-&gt;string[i]='\0';<BR>&nbsp;puts("修改后的链表:");<BR>&nbsp;for(p2=head;p2!=NULL;p2=p2-&gt;next)// 
                              显示出修改后的链表<BR>&nbsp; 
                              puts(p2-&gt;string);<BR>&nbsp;saveanddisplay(10+increhang);// 
                              将修改后的链表存盘并显示下一页内容<BR>&nbsp;xiugai=1;<BR>&nbsp;return 
                              0;<BR>} </P>
                              <P>int main()<BR>{<BR>&nbsp;char 
                              cmd;<BR>&nbsp;do<BR>&nbsp;{<BR>&nbsp; 
                              printf("\n\t\t****************************\n");<BR>&nbsp; 
                              printf("\t\t**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                              1&nbsp;&nbsp; EDIT&nbsp;&nbsp; **\n");<BR>&nbsp; 
                              printf("\t\t**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                              2&nbsp;&nbsp; HELP&nbsp;&nbsp; **\n");<BR>&nbsp; 
                              printf("\t\t**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                              3&nbsp;&nbsp; ABOUT&nbsp;&nbsp; **\n");<BR>&nbsp; 
                              printf("\t\t**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                              4&nbsp;&nbsp; EXIT&nbsp;&nbsp; **\n");<BR>&nbsp; 
                              printf("\t\t****************************\n");<BR>&nbsp; 
                              printf("\n\n请选择1,2,3,4:");<BR>&nbsp; 
                              cmd=getche();<BR>&nbsp; 
                              switch(cmd)<BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp; case 
                              '4' : system("cls"); byebye(); 
                              break;<BR>&nbsp;&nbsp; case '2' : system("cls"); 
                              HELP();&nbsp; cmd=0; break;<BR>&nbsp;&nbsp; case 
                              '3' : system("cls"); ABOUT(); cmd=0; 
                              break;<BR>&nbsp;&nbsp; case '1' : EDIT();&nbsp; 
                              cmd=0; break;<BR>&nbsp;&nbsp; default : 
                              printf("\n\n\n!!!输入错误!!!\n");<BR>&nbsp;&nbsp; 
                              }<BR>&nbsp;}while(cmd!='4');<BR>&nbsp;if(fp) 
                              fclose(fp);<BR>&nbsp;if(out) 
                              fclose(out);<BR>&nbsp;return 
                              0;<BR>}<BR></P><BR></FONT></TD></TR></TBODY></TABLE></TD></TR>
                    <TR>
                      <TD height=25 width="100%">
                        <DIV align=center></DIV></TD></TR>
                    <TR>
                      <TD height=20 width=255><A class=bottom 
                        href="http://www.cstudyhome.com/wenzhang06/review.asp?NewsID=3526" 
                        target=_blank>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<IMG 
                        border=0 height=18 
                        src="我的数据结构的实验作业(一个简单的行编辑程序)_数据结构与算法_数据结构算法_C语言_C 语言之家.files/icon1.gif" 
                        width=18> <FONT color=blue>发表评论</FONT></A> </TD></TR>
                    <TR>
                      <TD width="100%">
                        <HR SIZE=1>
                      </TD></TR>
                    <TR>
                      <TD height=8></TD></TR>
                    <TR>
                      <TD height=18 width="100%"><B>相关专题:</B> 
                    <TR>
                      <TD width="100%">
                        <HR SIZE=1>
                      </TD></TR>
                    <TR>
                      <TD height=8></TD></TR>
                    <TR>
                      <TD height=18 width="100%"><B>相关信息:</B></TD></TR>
                    <TR>
                      <TD height=8></TD></TR>
                    <TR>
                      <TD width="100%">&nbsp;没有相关信息</TD></TR>
                    <TR>
                      <TD width="100%">
                        <HR SIZE=1>
                      </TD></TR>
                    <TR>
                      <TD height=8></TD></TR>
                    <TR>
                      <TD width="100%"><B>相关评论:</B></TD></TR>
                    <TR>
                      <TD height=8></TD></TR>
                    <TR>
                      <TD width="100%"></TD></TR>
                    <TR>
                      <TD>
                        <TABLE border=0 cellPadding=5 cellSpacing=0 
width="100%">
                          <TBODY>
                          <TR bgColor=#d1e4fc>
                            <TD 
                              width="100%">发表人:→戀氺Δē魚&nbsp;&nbsp;&nbsp;发表人邮件:<A 
                              href="mailto:xujianfeng130@tom.com">xujianfeng130@tom.com</A>&nbsp;&nbsp;&nbsp;发表时间:2004-5-31 
                              10:50:26</TD>
                            <TD width=270>
                              <P align=right></P></TD></TR>
                          <TR>
                            <TD bgColor=#ffffff 
                              colSpan=2>程序太多了,,基础不好的朋友根本不知道看些什么东西,我是一名大一的学生,要做数据结构课程设计了,所以就来网上查一下资料了,我老师说这个程序只有一小段就可以搞定了,而你这个却太长了些吧,可以是你这个程序做出来的页面会好些一些的缘故吧,,,但是程序也并不是越长越复杂就越好,就我自己觉得还是简单明了的就好了,个人意见仅供参考。 
                            </TD></TR></TD></TR></TBODY></TABLE>
                        <HR noShade SIZE=1>
                      </TD></TR>
                    <TR>
                      <TD align=middle height=28 width="100%"><A class=bottom 
                        href="http://www.cstudyhome.com/wenzhang06/review.asp?NewsID=3526" 
                        target=_blank><IMG border=0 height=11 
                        src="我的数据结构的实验作业(一个简单的行编辑程序)_数据结构与算法_数据结构算法_C语言_C 语言之家.files/more.gif" 
                        width=50> <FONT color=blue>更多评论</FONT></A> 
                  </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE align=center bgColor=#c1c1c1 border=0 cellPadding=0 cellSpacing=0 
width=750>
  <TBODY>
  <TR>
    <TD>
      <TABLE align=center bgColor=#a7ccfa border=0 cellPadding=0 cellSpacing=0 
      width=748>
        <TBODY>
        <TR>
          <TD 
          background="我的数据结构的实验作业(一个简单的行编辑程序)_数据结构与算法_数据结构算法_C语言_C 语言之家.files/banbg.gif" 
          width=20> </TD>
          <TD 
          background="我的数据结构的实验作业(一个简单的行编辑程序)_数据结构与算法_数据结构算法_C语言_C 语言之家.files/banbg.gif" 
          height=20 width=255></TD>
          <TD 
          background="我的数据结构的实验作业(一个简单的行编辑程序)_数据结构与算法_数据结构算法_C语言_C 语言之家.files/banbg.gif" 
          height=20 width=214><A class=bottom 
            href="http://www.cstudyhome.com/wenzhang06/send.asp?NewsID=3526" 
            target=_blank><IMG border=0 height=16 
            src="我的数据结构的实验作业(一个简单的行编辑程序)_数据结构与算法_数据结构算法_C语言_C 语言之家.files/mail.gif" 
            width=16> 将本信息发给好友</A> </TD>
          <TD 
          background="我的数据结构的实验作业(一个简单的行编辑程序)_数据结构与算法_数据结构算法_C语言_C 语言之家.files/banbg.gif" 
          width=168><IMG height=14 
            src="我的数据结构的实验作业(一个简单的行编辑程序)_数据结构与算法_数据结构算法_C语言_C 语言之家.files/printer.gif" 
            width=16><A class=bottom href="javascript:window.print()"> 
          打印本页</A></TD>
          <TD 
          background="我的数据结构的实验作业(一个简单的行编辑程序)_数据结构与算法_数据结构算法_C语言_C 语言之家.files/banbg.gif" 
          width=91><INPUT name=close onclick="window.close();return false;" type=button value=关闭窗口> 
          </TD></TR>
        <TR vAlign=top>
          <TD bgColor=#c1c1c1 height=1 width=20></TD>
          <TD bgColor=#c1c1c1 colSpan=2 height=1 width=469></TD>
          <TD bgColor=#c1c1c1 colSpan=2 height=1 
    width=259></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!--<IFRAME src="http://www.cpok.com/ad/alp.htm?wangfu" width="760" height=110 marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></IFRAME>--><!--<IFRAME src='http://www.cpok.com/ad/alp.htm?wangfu' width='760' height='124' marginwidth='0' marginheight='0' frameborder='0' scrolling='no'></IFRAME>-->
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=750>
  <TBODY>
  <TR>
    <TD bgColor=#c1c1c1 height=1></TD></TR></TBODY></TABLE>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 class=p9 width=750>
  <TBODY>
  <TR>
    <TD align=middle 
    background="C:\Documents and Settings\chris\桌面\yzbo\我的数据结构的实验作业(一个简单的行编辑程序)_数据结构与算法_数据结构算法_C语言_C 语言之家.files\BACK1(1).gif" 
    height=20>&nbsp;</TD></TR>
  <TR>
    <TD align=middle height=20><A class=bottom 
      href="http://www.cstudyhome.com/wenzhang06/ReadNews.asp?NewsID=3526#" 
      onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.cstudyhome.com/wenzhang06');"><BR>设为首页</A> 
      | <A class=bottom 
      href="http://www.cstudyhome.com/wenzhang06/ReadNews.asp?NewsID=3526#" 
      onclick=window.external.AddFavorite(location.href,document.title);>加入收藏</A> 
      |<A class=bottom 
      href="http://www.cstudyhome.com/wenzhang06/ReadNews.asp?NewsID=1086" 
      target=_blank>广告服务</A>| <A class=bottom 
      href="mailto:xujianfeng130@tom.com">联系我们</A><A class=bottom 
      href="http://www.cstudyhome.com/wenzhang06/admin/login.asp" 
      target=_blank>.</A><BR><BR><BR>版权所有 Copyright &copy; 2002~2004 
  C语言之家<BR></TD></TR><BR>
  <TR></TR></TBODY></TABLE>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 class=p9 
  width="100%"><TBODY>
  <TR>
    <TD align=middle><!-- <script language=JavaScript>
document.write("<a href='http://www.sunofcn.com/counter13/infolist.asp?admin=dd123'>");
document.write("<img src='http://www.sunofcn.com/counter13/count.asp?admin=dd123&Referer="+escape(top.document.referrer)+"&curURL="+escape(top.document.URL)+"&Width="+escape(screen.width)+"&Height="+escape(screen.height)+"' border=0 width=80 height=30 alt='阳光统计|WWW.SUNOFCN.COM'>");
document.write("</a>");
</script>--></TD></TR></TBODY></TABLE><BR><BR><BR>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 class=p9 
  width="100%"><TBODY>
  <TR>
    <TD align=middle 
    background="我的数据结构的实验作业(一个简单的行编辑程序)_数据结构与算法_数据结构算法_C语言_C 语言之家.files/bott.gif" 
    height=30 width="7%">&nbsp;</TD>
    <TD align=middle 
    background="我的数据结构的实验作业(一个简单的行编辑程序)_数据结构与算法_数据结构算法_C语言_C 语言之家.files/footerbg.gif" 
    height=30 width="80%">&nbsp;<FONT 
      color=#dde99f>........................................................................................................</FONT>
      <SCRIPT 
      src="我的数据结构的实验作业(一个简单的行编辑程序)_数据结构与算法_数据结构算法_C语言_C 语言之家.files/Counter.htm"></SCRIPT>
    </TD></TR></TBODY></TABLE>7 </BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -