Project: Complete Contact Info

Add a phone number to the struct and display all three fields per contact.






Project: Complete Contact Info

Add a phone number to the struct and display all three fields per contact.






C++
#include <iostream>
#include <vector>
using namespace std;
struct Contact {
string name;
string email;
// Your code goes here
};
int main() {
// Make required changes in this code
vector<Contact> contacts;
contacts.push_back({"Ava", "ava@email.com"});
contacts.push_back({"Liam", "liam@email.com"});
for (int i = 0; i < contacts.size(); i++) {
cout << contacts[i].name << " - " << contacts[i].email << endl;
}
return 0;
}