Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c++ Start by creating a vector that will hold strings. Add the following strings to your vector in the order given. to, be, or, not,
c++
Start by creating a vector that will hold strings. Add the following strings to your vector in the order given. "to", "be", "or", "not", "to","be", Create a function that will print out the strings in order. Use your function on the current vector. Print out the vector as it looks right now. Now add the following strings to your vector. "that", "is", "the", "question", "to", "tell Print out the vector. Add the words "William" "Shakespeare" to the FRONT of the vector. Print out the vector. Create a function that will remove any word from the vector that starts with the letter 't'! - You can use string[0] == 't' to check the first letter of a string.. o Use a for loop to scan the array, and use erase to remove a word. o If you remove a word, set i back to zero so that you can check all the words again, this is important because the size will change and you don't want to miss any. Print out the result of the vector after removing the 't' wordsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started