【文学研究社】文学研究助手(改正版)

时间:2015-02-23  来源:Yahoo研究  阅读:

//本程序可以实现基本功能,请大家根据情况填加完善本程序的程序段!
#include "string.h"
#include "stdio.h"
#include "alloc.h"
#include "stdlib.h"
#define N 10       
#define M 10      
struct linelist
{
    int linenum;
    struct linelist *next;
};
struct keyword
{
    struct string *string1;
    int num;
    struct linelist *head,*tail;
}keyword1[N];
 
struct string
{char string2[M];
}string3[N]={’/0’};
FILE *fp=NULL;
int row=0;              
 
void init() 
{
    int i;
    for (i=0;i
    {keyword1[i].num=0;
        keyword1[i].string1=string3[i].string2;
        keyword1[i].head=NULL;
        keyword1[i].tail=NULL;
    }
}
void fileopen()

    char filename[30];
    for (;;)
    {
        printf("请输入要查找关键字的文件:");
        scanf("%s",filename);
        if ((fp=fopen(filename,"r"))==NULL)
            printf("不能打开此文件!请重新输入!n");
        else
            break;
    }
}
 
void inputkeyword()
{
    int i;
    for (i=0;i
    {printf("请输入要查找的关键字:");
        scanf("%s",string3[i].string2);
    }
}

【文学研究社】文学研究助手(改正版)

http://m.bbyears.com/seo/13164.html

推荐访问:文学研究方法都有什么 文学的研究方法
相关阅读 猜你喜欢
本类排行 本类最新