#include<stdio.h>
#include<string.h>
char *get_le_contents(const char *lename)
{
FILE *pFile=NULL;
char mystring [100];
pFile = fopen ("C:\text.3.txt" , "r");
if (pFile == NULL){
perror("Error opening le");
return NULL;
}
else {
if (fgets(mystring, 100, pFile) != NULL)
{
return mystring;
}
else{
perror("Error reading le");
return NULL;
}
}
}
#dene N 26
#dene M (2*N-1)
typedef struct Hu8Node{
unsigned int weight;
unsigned int parent, lchild, rchild;
}HTNode;
typedef struct Hu8Code{
char data;
int weight;
char code[N];
}HTCode;
void Init(HTCode hc[], int n){
int i, total = 0;
int length;
int ta[26] = { 0 };
char *message=NULL;
message = get_le_contents("character.txt");
评论0
最新资源