用哈希表判别两个源程序的相似性.docVIP

  • 2
  • 0
  • 约4.86千字
  • 约 5页
  • 2019-08-11 发布于江西
  • 举报
用哈希表判别两个源程序的相似性 以下是应用源程序代码: 将以下程序下载后,用C++6.0打开,同时在根目录下新建三个文本文档(.txt格式)。命名分别为keyword,program1,program2;即可运行出结果。 #includestdio.h #includestdlib.h #includemath.h #includestring.h typedef struct node {char c[10]; int len; //记录关键字的长度 struct node *q; }keynode; //关键字结点,认为关键字的长度不超过10个字符 typedef struct table {char w; keynode *p; }hash; //定义哈希表类型 void init_value(hash key[],char stack[] ,int information1[], int information2[] ) //初始化函数 { int i; for(i=0;i100;i++) key[i].p=NULL; for(i=0;i10;i++) stack[i]=\0; for(i=0;i20;i++) {

文档评论(0)

1亿VIP精品文档

相关文档