-
Notifications
You must be signed in to change notification settings - Fork 0
/
Contrller.h
47 lines (38 loc) · 945 Bytes
/
Contrller.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef _CONTROLLER_H_
#define _CONTROLLER_H_
#include <stdlib.h>
#include <string.h>
#include <memory.h>
using namespace std;
#pragma once
#define MAX_SIZE 255
typedef struct Head
{
}Head;
typedef struct Info
{
char* szWord;
char* szMean;
struct Info* left;
struct Info* right;
}Info;
class Contrller
{
public:
Contrller(void);
~Contrller(void);
char* m_szWord;
char* m_szMean;
Info* NewNode(Info* root, char* word, char* mean);
Info *InsertNode(Info* root, char* word, char* mean);
Info* Delete(Info* root, char* word);
Info *FindSuccessor(Info *root);
Info *Search(Info *root, char* word);
void Save(Info *root, FILE* file);
Info* Load(Info *root, FILE* in);
char* StrWord(char *word, BOOL flag);
char *StrMean(char *mean, BOOL flag);
Info* LoadInsert(Info* root, char** pword, char** pmean, int nCnt);
void ChangeNode(Info* root, char* word, char* mean);
};
#endif