求一个注释,帮忙解析以下代码
#include<iostream>
#include<string>
#include<cstdlib>
#define MAX 2000
using namespace std;
//通讯录管理系统
//设计联系人结构体
struct Person {
string m_Name;
int m_Sex;
int m_Age;
string m_Phone;
string m_Addr;
};
//设计通讯录结构体
struct Addressbooks {
//通讯录中保存的联系人数组
struct Person personArray[MAX];
//通讯录中当前记录的联系人个数
int m_Size;
};
//添加联系人
void addPerson(Addressbooks* abs) {
//判满
if (abs->m_Size == MAX) {
cout << "通讯录已满" << endl;
return;
}
else {
//姓名
string name;
cout << "请输入姓名" << endl;
cin >> name;
abs->personArray[abs->m_Size].m_Name = name;
//性别
cout << "请输入性别" << endl;
cout << "1——男" << endl;
cout << "2——女" << endl;
int sex = 0;
while (true) {
cin >> sex;
if (sex == 1 || sex == 2) {
abs->personArray[abs->m_Size].m_Sex = sex;
break;
}
cout << "输入有误,重新输入" << endl;
}
//年龄
cout << "请输入年龄" << endl;
int age = 0;
cin >> age;
abs->personArray[abs->m_Size].m_Age = age;
//电话
cout << "请输入电话" << endl;
string phone;
cin