Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ /* Write code for void function display_vector that accepts parameter const reference vector of strings. The function will iterate through the vector and display

C++

/* Write code for void function display_vector that accepts parameter const reference vector of strings. The function will iterate through the vector and display a string per line. */

Write code for void function update_vector_element that accepts parameter reference vector of strings, a string vector search_value, and a string replace_value. The function will iterate through the vector and search for the search_value and if found will replace the vector element with the replace_value. */

Write code to create a vector of string names, add the values "John", "Mary", "Patty",

"Sam" to the vector, call the function display_vector and pass the names vector as

an argument, prompt user for a name to search for and a value to replace searched value with.

Afterward, call the update_vector_element with the names vector and call the display_vector function.

Don't worry about displaying a message for values that aren't found. Assume user will give you a valid name.

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

Step: 3

blur-text-image

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

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions

Question

2. What is the meaning and definition of Banking?

Answered: 1 week ago

Question

3.What are the Importance / Role of Bank in Business?

Answered: 1 week ago