autodataming的个人博客分享 http://blog.sciencenet.cn/u/autodataming

博文

KVFinder中的数据结构

已有 2022 次阅读 2016-11-14 17:39 |个人分类:软件|系统分类:科研笔记

   for(i=-1;fscanf(dictionary_file,"%s",AUX)!=EOF && i<tablesize;)
   {
       printf("aux %sn",AUX);
       if(AUX[0]=='>')
       {
           i++;
       }
       else if(AUX[0]=='#')
       {
           continue;
       }
       else
       {
           //  temp variable
           p = (dict *) malloc(sizeof(dict));
           trim(AUX,' ');   // trim head space in the AUX
           

           //fscanf(dictionary_file,"%lf",&p->charge);
           fscanf(dictionary_file,"%lf",&p->radius);
           strcpy(p->symbol,AUX);
           p->next=NULL; // first node point to Null
           if(DIC[i]==NULL)
           {
               // header of the chain
               DIC[i] = (dict *) malloc(sizeof(dict));
                DIC[i]->next=p;


           }
           else
           {
           
               // the body of the chain
               p->next = DIC[i]->next;
               DIC[i]->next = p ;
               printf("address: %pn",DIC[i]->next);
           }
       }    
   }
----------------------------------------------------




https://wap.sciencenet.cn/blog-950202-1014752.html

上一篇:开源对接软件
下一篇:python Tkinter 注意事项
收藏 IP: 202.127.19.*| 热度|

1 yangb919

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-3-29 09:56

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部