From f7dd21a9467c7d3396da7bed1c98ff844d3d95a9 Mon Sep 17 00:00:00 2001 From: pue2kga9m Date: Sat, 22 Jun 2024 16:27:17 +0800 Subject: [PATCH] Update ContactManager.h --- ContactManager.h | 68 ++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/ContactManager.h b/ContactManager.h index e647239..ae1d26d 100644 --- a/ContactManager.h +++ b/ContactManager.h @@ -1,34 +1,34 @@ -#pragma once -#ifndef CONTACT_MANAGER_H -#define CONTACT_MANAGER_H - -#include -#include - -// 声明联系人结构体 -struct Contact { - int id; - std::string name; - std::string phone; -}; - -// 声明联系人管理类 -class ContactManager { -private: - std::vector contacts; // 存储联系人的向量 - -public: - // 添加联系人 - void addContact(); - - // 显示通讯录 - void displayContacts() const; - - // 查找联系人 - void findContact() const; - - // 删除联系人 - void deleteContact(); -}; - -#endif // CONTACT_MANAGER_H +#pragma once +#ifndef CONTACT_MANAGER_H +#define CONTACT_MANAGER_H + +#include +#include + +// 声明联系人结构体 +struct Contact { + int id; + std::string name; + std::string phone; +}; + +// 声明联系人管理类 +class ContactManager { +private: + std::vector contacts; // 存储联系人的向量 + +public: + // 添加联系人 + void addContact(); + + // 显示通讯录 + void displayContacts() const; + + // 查找联系人 + void findContact() const; + + // 删除联系人 + void deleteContact(); +}; + +#endif // CONTACT_MANAGER_H