Suppose v is an object of the class vector<int>. Use the search generic
function (Display 18.18) to write some code to determine whether or not
v contains the number 42 immediately followed by 43. You need not give
a complete program, but do give all necessary include and using directives. Hint: It may help to use a second vector.
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.