Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this C++ code This program will allow the user to see a list of teams, add a team to the list,

I need help with this C++ code

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

This program will allow the user to see a list of teams, add a team to the list, or search for a team using an ID 1. Structure Definition (5 points) First define struct TeamS with an integer field to hold an ID, and an array of strings with three elements to hold the names of the team members. In the main function, declare an empty vector of TeamV and also the following arrays const int ID [NUM_TEAMS]123, 321, 456, 789); const string MEMBERS [NUM-TEAMS ] [NUM MEMBERS ] "Sarah", "Joe", "John", "Chris", "Kevin", "James", "Tom", "Kim", "Emily", ("Jill", "Jason", 2. Creating the vector (9 points) Call a function with the following prototype and pass in the empty vector and the array!s void Initialize (vector & TeamV, const int id, const string m [NUM MEMBERS ], int arraySize)i The function should place into the vector the elements of the arrays. For example, the first element of the vector will have team id: 123 and members: Sarah, Joe, and John. The second element of the vector will have team id: 321 and members: Chris, Kevin, and James, and so on 3. The print function (10 points) Back in main, call a function with the following prototype to show that your vector has been populated with the team information: void printList (const vector & TeamV) The function simply prints out the content of the vector

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 1 Lnai 9284

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Carlos Soares ,Joao Gama ,Alipio Jorge

1st Edition

3319235273, 978-3319235271

More Books

Students also viewed these Databases questions

Question

What is a verb?

Answered: 1 week ago