aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNataliia Brown <[email protected]>2024-02-14 01:59:14 -0800
committerNataliia Brown <[email protected]>2024-02-14 01:59:14 -0800
commitb927e8779fd7f0dc80daf62d074a9e124a377591 (patch)
treeb6f3478e66db59847ab9e4912980615d432b6989
parentanother title (diff)
downloadhomework-5-natabrown-b927e8779fd7f0dc80daf62d074a9e124a377591.tar.xz
homework-5-natabrown-b927e8779fd7f0dc80daf62d074a9e124a377591.zip
working on modifying
-rw-r--r--Homework 5/Homework 5/program.cpp137
1 files changed, 12 insertions, 125 deletions
diff --git a/Homework 5/Homework 5/program.cpp b/Homework 5/Homework 5/program.cpp
index 22b37d2..9a0c555 100644
--- a/Homework 5/Homework 5/program.cpp
+++ b/Homework 5/Homework 5/program.cpp
@@ -39,28 +39,25 @@ void main(){
}
else if (i == 2)
- {
+ {
//system("cls");
- cout << "Modifying Contact: " << endl;
+ cout << "Enter email to update contact: " << endl;
+
+ char email;
+ cin >> email;
- /*void ModifyContacts(vector<Contact> &contact, string name, string new_name) {
- vector<Contact>::iterator it;
- for (it = contact.begin(); it != contact.end(); it++)
+ for (int count = 0; count < vecContacts.size(); count++)
+ {
+ if (vecContacts[count].Email = email)
{
- if (it->Name == name)
- {
- it->Name = new_name;
- break;
- }
+ cout << "\nName: " << vecContacts[count].Name << "\nEmail: " << vecContacts[count].Email << "\nStreet Adress: " << vecContacts[count].StreetAdress << "\nCity: " << vecContacts[count].City << "\nState: " << vecContacts[count].State << "\nZip: " << vecContacts[count].Zip << endl;
}
- }*/
- /*UpdateContact()
-
- UserDob newUser = InputPersonalInfo();
- PrintUserInfo(newUser); - Update all fields for the same email*/
+
+
}
+ }
else if (i == 3)
{
//system("cls");
@@ -90,113 +87,3 @@ void main(){
-
-
-
-
-
-
-
-//void Print100(size_t n) {
-// for (int j = 0; j <= n; j++) {
-// cout << j << " ";
-// }
-// cout << endl;
-//}
-//
-//void PrintFibonacci(size_t n) {
-// int k, t1 = 0, t2 = 1, nextTerm = 0;
-//
-// cout << "Enter the number of terms: ";
-// cin >> k;
-//
-// cout << "Fibonacci Series: ";
-//
-// for (int i = 1; i <= k; ++i) {
-//
-// if (i == 1) {
-// cout << t1 << " ";
-// continue;
-// }
-// if (i == 2) {
-// cout << t2 << " ";
-// continue;
-// }
-// nextTerm = t1 + t2;
-// t1 = t2;
-// t2 = nextTerm;
-//
-// cout << nextTerm << " ";
-// }
-//
-//
-//}
-//
-//struct UserDob
-//{
-// int day;
-// int month;
-// int year;
-//};
-//
-//UserDob InputPersonalInfo()
-//{
-// UserDob user = {};
-//
-// cout << "\nDay: ";
-// cin >> user.day;
-//
-// cout << "Month: ";
-// cin >> user.month;
-//
-// cout << "Year: ";
-// cin >> user.year;
-//
-// return user;
-//
-//}
-//
-//void PrintUserInfo(UserDob newUser) {
-//
-// cout << "User's DOB: " << newUser.month << "/" << newUser.day << "/" << newUser.year << endl;
-//}
-//
-//int main() {
-// int i;
-// Menu();
-// cin >> i;
-//
-//
-// while (i != 4) {
-// system("cls");
-// if (i == 1)
-//
-// {
-// cout << "Enter the number for Print 100 function: ";
-// int n;
-// cin >> n;
-// Print100(n);
-// }
-// else if (i == 2)
-// {
-// UserDob newUser = InputPersonalInfo();
-// PrintUserInfo(newUser);
-// }
-// else if (i == 3)
-// {
-// PrintFibonacci(i);
-// }
-//
-//
-// int j;
-// Menu();
-//
-// cin >> j;
-// i = j;
-// }
-//
-// return 0;
-//}
-
-
-