#include<stdio.h>
#include<string.h>
#include<stdlib.h>
struct address
{
char province[20];
char city[20];
char town[20];
char countryside[20];
};
struct dianhua
{
char a[15]; // A类
char b[15];
char c[15];
};
struct tongxunlu
{
int num;
struct dianhua tn; // telephone number
char name[20];
char email[20];
char code[10];
struct address dizhi;
};
int count=0;
int x=0;
int p=2; //p==0时删除数据,p==1时更新数据
int q=2; //q==0时输出更新的数据,q==1时输出寻找的数据,q==3时删除数据
void update_jilu(struct tongxunlu friends[],struct address dizhi[],struct dianhua tn[]); //更新
void new_jilu(struct tongxunlu friends[],struct address dizhi[],struct dianhua tn[]); // 新建 //
void search_jilu(struct tongxunlu friends[],char b[],int a,struct address dizhi[],struct dianhua tn[],int lx); // 寻找//
void delete_jilu(struct tongxunlu friends[],struct address dizhi[],struct dianhua tn[],char b[],int i,int q); //删除//
void output_jilu(struct tongxunlu friends[],struct address dizhi[],struct dianhua tn[],char b[],int q,int i); // 输出 //
int chongfu(struct tongxunlu friends[],int r,struct dianhua tn[],char b[]); //查询重复//