#include <stdio.h>#include <stdlib.h>#include <string.h>#define szSTR 64 #define fileDB "c:\\contact.txt" struct CONTACT { char name[szSTR]/*
姓名*/ char unit[szSTR]/*工作棚纳单位*/ char tele[szSTR]/*电话*/ char mail[szSTR]/*mail*/ }typedef struct CONTACT CON#define BNAME 1 #define BUNIT 2 #define BTELE 4 #define BMAIL 8 #define BFULL 0xFF int OPER[5] = void input(CON * s, int mask) { if(mask &BNAME) if(mask &BUNIT) if(mask &BTELE) if(mask &BMAIL) }/*end input*/ void show (int id, CON * s) { if(!s) return if(id) printf("%d\t%s\t%s\t%s\t%s\n", id, s->name , s->陆旦unit , s->tele , s->mail )else printf("%s%s%s%s\n", s->name , s->unit , s->tele , s->mail )/*end if*/ }/*end show*/ void regist(void) { CON sFILE * f = 0input(&s, BFULL)f = fopen(fileDB, "ab")fwrite(&s,sizeof(s),1,f)fclose(f)printf("资料已保存!\n")}/*end regist*/ int browse(char * key, fpos_t * p, CON * s) { FILE * f =0int i = 0, r = 0CON tchar * a = 0, * b = 0fpos_t q if(!s) return 0f = fopen(fileDB, "rb")if(!f) { printf("数据库暂无记录\n")return 0}/*end if*/ printf("编号\t姓名\t单位早和扰\t电话\t电邮\n")printf("------------------------------------------------\n")while(!feof(f)) { fgetpos(f, &q)r = fread(&t, sizeof(t), 1, f)if(r<1)breakif(t.name[0]==0) continueif(key) { a = strstr(t.name , key)b = strstr(t.tele , key)if(a == 0 &&b == 0) continue}/*end if*/ if(p) *p = qif(s) memcpy(s, &t, sizeof(t))i++show(i, &t)}/*end while*/ fclose(f)printf("------------------------------------------------\n")return i}/*end browse*/ fpos_t query(CON * s) { char key[szSTR]=""fpos_t p = 0int r = 0printf("请输入姓名或者电话号码:")scanf("%s", key)r = browse(key, &p, s)return r?p:-1}/*end query*/ void clear(void) { FILE * f = 0CON sfpos_t p = query(&s)if(p<0) returnf = fopen(fileDB, "rb+")fsetpos(f, &p)memset(&s, 0, sizeof(s))fwrite(&s, sizeof(s),1, f)fclose(f)printf("记录已删除!\n")}/*end clear*/ void modify(void) { FILE * f = 0CON sint cmd = 0fpos_t p = query(&s)if(p<0) returnf = fopen(fileDB, "rb+")fsetpos(f, &p)for() { show(0, &s)printf("
请选择:1-姓名2-工作单位3-电话4-电邮5-保存并退出6-放弃修改并退出\n")scanf("%d", &cmd)switch(cmd) { case 1: case 2: case 3: case 4: input(&s, OPER[cmd])breakcase 5: fsetpos(f, &p)fwrite(&s, sizeof(s), 1, f)case 6: fclose(f)returndefault: printf("错误的 *** 作,请重新输入。\n")}/*end case*/ }/*mext*/ }/*end clear*/ int main(void) { int cmd = 0CON sfor() { printf("欢迎使用通信簿!请选择:1-添加2-查询3-删除4-修改5-全部输出0-退出\n")scanf("%d", &cmd)switch(cmd) { case 0: return 0case 1: regist()breakcase 2: query(&s)breakcase 3: clear()breakcase 4: modify()breakcase 5: browse(0, 0, &s)break}//end case } return 0}
记得采纳啊
找出方法:
①在桌面空白的地方,两指分开向两边划,隐藏的应用就显示了。
②点击加号,
③在d出的窗口里面,把已仔旅蚂经隐藏的应用前面的勾去掉,点击“确定”,隐藏的应用就恢复了。
隐藏应用的方法:
打开手机,然后进入到应用程序列表的界面中。
然后点镇肢击手机上的“菜单”按钮,d出菜单选项,选择“隐藏应用”。
在“隐藏应用”的界面中,选择好自己需要隐藏的应用,然后点击上方的“√”,完成隐藏念埋。
返回到应用程序列表,发现隐藏应用成功。
评论列表(0条)