我们从2011年坚守至今,只想做存粹的技术论坛。  由于网站在外面,点击附件后要很长世间才弹出下载,请耐心等待,勿重复点击不要用Edge和IE浏览器下载,否则提示不安全下载不了

 找回密码
 立即注册
搜索
查看: 652|回复: 1

ALIENTEK MINISTM32 实验12 待机唤醒实验.rar

[复制链接]

该用户从未签到

1869

主题

533

回帖

172

积分

禁止发言

好好学习

积分
172

社区居民原创达人社区劳模终身成就奖

QQ
发表于 2015-4-19 16:42:47 | 显示全部楼层 |阅读模式
ALIENTEK MINISTM32 实验12 待机唤醒实验.rar

ALIENTEK MINISTM32 实验12 待机唤醒实验.rar

306 KB, 下载次数: 0, 下载积分: 金币 -1 枚

做好自己的事
回复

使用道具 举报

该用户从未签到

9

主题

37

回帖

24

积分

一级逆天

积分
24

社区居民终身成就奖

QQ
发表于 2015-4-26 08:14:24 | 显示全部楼层
}
            
            break;
        
        }
        
        if(choice == 'Y')break;
   
    }
   
    for(;;)
   
    {
        
        printf("\\n是否为顶点?(Y/N)\\n");
        
        scanf("%s" , &choice);
        
        choice = toupper(choice);
        
        if(choice == 'N')
        
        {        
        
            printf("\\n请输入对新对象的描述\\n");
            
            scanf("%s" , feature);
            
            for(i = 0 ; i < nodenum ; i++)
            
            {
            
                ntx = nodelink;
               
                if(strstr(feature , ntx->feature)!=NULL)
               
                {            
               
                    newl = (struct SUBLINK*) malloc (sizeof(sublink));
                    
                    if(newl == NULL)
                    
                    {
                    
                        printf("\\n内存不够!\\n");
                        
                        exit(0);
                    
                    }
                    
                    if(newnode->upnnum == 0)
                    
                        newnode->upnode = endl = newl;
                    
                    newl->index = i;
                    
                    endl->next = newl;
                    
                    endl = newl;
                    
                    newl->next = NULL;
                    
                    newnode->upnnum++;
        
///////////////////////////////将信息写入父节点
                    
                    newl = (struct SUBLINK*) malloc (sizeof(sublink));
                    
                    if(newl == NULL)
                    
                    {
                    
                        printf("\\n内存不够!\\n");
                        
                        exit(0);
                    
                    }
                    
                    if(ntx->sonnum == 0)
                    
                        ntx->sonnode = endl = newl;
                    
                    newl->index = nodenum;
                    
                    newl->next = ntx->sonnode;
                    
                    ntx->sonnode = newl;
                    
                    ntx->sonnum++;
               
                }

            }
        
            break;

        }

        
        if(choice == 'Y')break;
   
    }   
   
    nodelink[nodenum] = newnode;
   
    nodenum++;

}



void store()

{

    int i , j;   
   
    char s[10];
   
    FILE *kf;
   
    struct NODE *writenode;
   
    struct SUBLINK *newlink , *oldlink;
   
    if((kf = fopen("knowledgestore.txt" , "w")) == NULL)
   
    {
   
        printf("Cannot create/open file");
        
        exit(1);
   
    }

    fprintf(kf , "%5d" , nodenum);
   
    for(i = 0 ; i < nodenum ; i++)
   
    {
   
        writenode = nodelink;
        
        fprintf(kf , "%20s" , writenode->feature);
        
        fprintf(kf , "%5d" , writenode->upnnum);
        
        newlink = writenode->upnode;
        
        for(j = 0 ; j < writenode->upnnum ; j++)
        
        {
        
            fprintf(kf , "%5d" , newlink->index);
            
            oldlink = newlink;
            
            newlink = newlink->next;
            
            free(oldlink);
        
        }

        
        fprintf(kf , "%5d" , writenode->type);
        
        fprintf(kf , "%5d" , writenode->sonnum);
        
        newlink = writenode->sonnode;
        
        for(j = 0 ; j < writenode->sonnum ; j++)
        
        {
        
            fprintf(kf , "%5d" , newlink->index);
            
            oldlink = newlink;
            
            newlink = newlink->next;
            
            free(oldlink);
        
        }

        free(writenode);
   
    }

    strcpy(s , "end");
   
    fprintf(kf , "%10s" , s);
   
    fclose(kf);
   
    exit(0);

}



int showfault()

{

    char choice;
   
    for(;;)
   
    {
   
        printf("是否继续?(Y/N)\\n");
        
        scanf("%s" , &choice);
        
        while(choice == '10');
        
        choice = toupper(choice);
        
        if(choice == 'Y')return 1;
        
        if(choice == 'N')exit(0);
   
    }   

}
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

论坛开启做任务可以
额外奖励金币快速赚
积分升级了


Copyright ©2011-2024 NTpcb.com All Right Reserved.  Powered by Discuz! (NTpcb)

本站信息均由会员发表,不代表NTpcb立场,如侵犯了您的权利请发帖投诉

平平安安
TOP
快速回复 返回顶部 返回列表