Question
Each of the following code snippets has errors. Find as many as you can.// This code has an error.vector<string> strv = {"one", "two", "three"};vector<string>::iterator it = strv.cbegin();
Step 1
The code snippet uses `vector<string>::iterator`, which is a mutable iterator. However, the `cbegin()` function returns a constant iterator (`vector<string>::const_iterator`), which means it cannot be assigned to a mutable iterator type. Show more…
Show all steps
Your feedback will help us improve your experience
Watch the video solution with this free unlock.
EMAIL
PASSWORD