?? telephone.cpp
字號:
//aso shojaie
#include<iostream.h>
#include <string.h>
#include <ctype.h>
#include <conio.h>
#include <dos.h>
#include <fstream.h>
#include <process.h>
#include <stdio.h>
#include <stdlib.h>
#include <ERRNO.H>
#include <STDDEF.H>
#include <STDLIB.H>
typedef char string8[9];
typedef char string15[16];
typedef char string100[101];
typedef char string40[41];
////////////////////////////////////////////////////////////////////
struct DATE{
char month[2],day[2],year[4];};
//////////////////////////////////////////////////////////////////////
struct entrytype{
string15 name;
string15 family;
string8 phonenumber;
string100 adress;
int del;
DATE today;
char areacode[5];
};
///////////////////////////////////////////////////////////
struct tel
{
char telnum[10];
int index; //the index number of the record
};
tel s[100];
entrytype telrecord;
fstream fp;
int index1;
int count;
//******************************************************************PROTOTYPES
run(string40);
void bigmenu();
void menu();
void write();
entrytype reads(entrytype);
int valid1(char s[20]);
int valid2(char s[10]);
int display(char choice);
void write1(entrytype ,int l);
void delet(string40);
void writes(entrytype );
int search1(char teln[10]);
void make_struct(string40);
void update(string40);
void search(string40);
void sort(string40);
void reorganize(string40);
entrytype read2(entrytype);
emptyfile(string40);
FILE* openfile(string40,string8);
void copy();
//************************************************************************MAIN
main()
{ string40 filename;
cout<<"enter your file name: ";
gets(filename);
textcolor(15);
textbackground(1);
clrscr();
run(filename);
return(0);
}
//*************************************************************************RUN
//The heart of the program.
run(string40 filename)
{
bigmenu();
menu();
char choice;
textcolor(15);
textbackground(BLUE);
cin>>choice;
switch(choice){
case '1': write();
break;
case '2': window(29,5,66,10);
textbackground(1);
clrscr();
textcolor(15);
gotoxy(1,1); cout<<" 賞屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯突";
gotoxy(1,2); cout<<"
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -