C++ Please Write a program that utilizes a struct data structure and a vector of that structure type. 1. Create an Account struct that includes the following data members: string fName (first name), string IName (last name), string email. 2. Create a vector of type Account called "Accounts". [vectorvectorName] 3. Create two Accounts acct1 and acct2. Use user-input the get data for the accounts. 4. Add both Accounts to the accounts vector. 5. Use a loop to print every Account in the vector. Struct_Practice.cpp #include #include #include using namespace std; int main(){ struct Account{ string fName; /* ADD CODE HERE */ } Account acct1; Account acct2; vector accounts; /* ADD CODE HERE */ count << endl; // bank line for (int i=0 ; i< accounts.size();++i){ /* ADD CODE HERE */ } }// end main()
C++ Please
Write a program that utilizes a struct data structure and a
1. Create an Account struct that includes the following data members: string fName (first name), string IName (last name), string email.
2. Create a vector of type Account called "Accounts". [vector<VectorDataType>vectorName]
3. Create two Accounts acct1 and acct2. Use user-input the get data for the accounts.
4. Add both Accounts to the accounts vector.
5. Use a loop to print every Account in the vector.
Struct_Practice.cpp
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(){
struct Account{
string fName;
/* ADD CODE HERE */
}
Account acct1;
Account acct2;
vector<Account> accounts;
/* ADD CODE HERE */
count << endl; // bank line
for (int i=0 ; i< accounts.size();++i){
/* ADD CODE HERE */
}
}// end main()
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 5 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)