This C++ program implements a simple Contact Management System (CMS) that allows users to add, display, search, modify, and delete contacts. It stores contact information (ID, name, and phone number) in a text file (contacts_db.txt).
- Add new contacts with unique IDs.
- Display a list of all stored contacts.
- Search for a contact by ID.
- Modify an existing contact's name and phone number.
- Delete a contact from the database.
- A C++ compiler (e.g., GCC, Clang)
- A text editor or IDE (e.g., Visual Studio Code, Code::Blocks)
git clone https://github.com/Tanvidubey/cms.git
Navigate to the project directory: cd contact-management-system
g++ main.cpp -o cms
./cms
The program presents a menu-driven interface. Select the desired option to manage your contacts:
Add Contact: Enter a unique ID, name, and valid 10-digit phone number (no spaces or hyphens). Display Contacts: View a list of all stored contacts. Search Contact: Enter an ID to search for a specific contact. Modify Contact: Enter the ID of the contact you want to edit, then update the name and phone number. Delete Contact: Enter the ID of the contact you want to remove. Exit (0): Terminate the program.
C++ programming language
Consider including a license file (e.g., MIT License) to specify how others can use and distribute your code. You can find license templates online.
If you'd like to contribute to this project, feel free to fork the repository, make changes, and submit a pull request.
Error handling could be improved to provide more informative messages in case of invalid user input or file operations. Consider adding functionality for sorting and filtering contacts.