#pragma once
#include<string.h>
#include<stdio.h>
#include<time.h>
#include<iostream>
#include"Exit.h"
#include"Menu.h"
#include"Add.h"
#include"Display.h"
#include"Delete.h"
#include"Empty.h"
#include"Revise.h"
#include"Find.h"
#include"Test.h"
using namespace std;
0.1.2 Menu.h
#pragma once
#include<string.h>
#include<stdio.h>
#include<time.h>
#include<iostream>
using namespace std;
extern int menu();
0.1.3 Add.h
#pragma once
#include"Data.h"
using namespace std;
extern int add();
extern int testAdd(string name, string sex, int age, string phoneNum, string address);
0.1.4 Delete.h
#pragma once
#include"Display.h"
#include"Data.h"
using namespace std;
int deletes();
0.1.5 Display.h
#pragma once
#include"Data.h"
using namespace std;
int display();
0.1.6 Empty.h
#pragma once
#include"Domain.h"
using namespace std;
int empty();
0.1.7 Find.h
#pragma once
#include"Domain.h"
using namespace std;
int find();
0.1.8 Revise.h
#pragma once
#include"Domain.h"
using namespace std;
int revise();
0.1.9 Exit.h
#pragma once
#include<string.h>
#include<stdio.h>
#include<time.h>
#include<iostream>
using namespace std;
extern int Exit();
0.1.10 Data.h
#pragma once
#include<string.h>
#include<stdio.h>
#include<time.h>
#include<iostream>
#include<fstream>
#include<vector>
#include<tchar.h>
#include"Domain.h"
#define MAX 1024
using namespace std;
struct People;
extern int file();
extern int num();
extern int deletes(int);
extern int emptyData();
extern int reviseData(int);
extern People* displayPeople();
extern People findData(string);
extern People addPeople(People );
struct People
{
string name;
string sex;
int age;
string phoneNum;
string address;
};
0.1.11 Test.h
#pragma once
#include"Domain.h"
extern int test();
关于源文件<.cpp>
1.1 -->类似于表示层
1.1.1 Domain.cpp
#pragma once
#include"Domain.h"
//菜单
int main() {
int select;
A:
select = menu();
cout << select << endl;
//{"1.添加联系人"},
switch (select)
{
case 1: add();
goto A;
case 2: display();
goto A;
case 3: deletes();
goto A;
case 4: find();
goto A;
case 5:revise();
goto A;
case 6:empty();
goto A;
case 7: test();
goto A;
default :Exit();
break;
}
}