⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 telephone.cpp

📁 a simple data structure code
💻 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 + -