龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 软件开发 > C/C++开发 >

小型的文本编辑器(使用能通配符*和?)

时间:2009-12-22 15:42来源:未知 作者:admin 点击:
分享到:
小型的文本编辑器(使用能通配符*和?)使用时确保你要处理的文件在当前工作目录下。 #include #include #include #include typedef strUCt { char Word[20]; int length; }wordtype; wordtype seekword; /*seekword用

小型的文本编辑器(使用能通配符*和?)使用时确保你要处理的文件在当前工作目录下。

  #include

  #include

  #include

  #include

typedef strUCt {

   char Word[20];

   int length;

  }wordtype;

  wordtype seekword; /*seekword用来放要查找的词*/

  wordtype save; /*save用来临时成放从文件中读出的词*/

int check(char ch) /*检查是否是合法的字符*/

  {

   if(ch<='9'&&ch>='0'ch<='z'&&ch>='a'ch<='Z'&&ch>='A')

   return 1;

   else

   return 0;

}

void length() /*计算seekword 和save中的word[]的长度*/

  {

   int i;

seekword.length=0;

   save.length=0;

   for(i=0;seekword.word[i]!='

  

精彩图集

赞助商链接