happygongc happygongc
关注数: 38 粉丝数: 293 发帖数: 380 关注贴吧数: 15
求助!!帮忙看一下这个算法程序有什么错误?? #include "stdafx.h" #include<string.h>    #include <malloc.h> #include <stdlib.h>    struct    cell{       char    *point;       struct    cell    *next;}*dictionary;       void    compress(FILE *in,FILE *out,struct cell *dic);       void    expand(FILE    *in,FILE    *out,struct    cell    *dic);       void    addtodictionary(char    *p,struct    cell    *dic);       int    inthetable(char    *c,struct    cell    *dic);       int    inthestringtable(int    k,struct    cell    *dic);       int    n=95;            main()       {           int    choise,i;    char    *infilename,*outfilename;    FILE    *infile,*outfile;           struct    cell    *dtemp1,*dtemp2;           dictionary=(struct cell *)malloc(sizeof(struct    cell));           *(dictionary->point)=32;        dictionary->next=NULL;           dtemp1=dictionary;           for(i=33;i<=127;i++)           {             dtemp2=(struct    cell*)malloc(sizeof(struct    cell));             dtemp1->next=dtemp2;dtemp2->next=NULL;             *(dtemp2->point)=i;           }              /*Dui    Ditionary    Chu    SHi    Hua*/                 printf("<1>    for    Compress.\n<2>    for    Expand.\n<0>    for    Exit!\n    ");           printf("Please    Input    Your    Choise:");   
1 下一页