Question: I have need help implementing the function. It must use STL list API. CS two lists. Modify the List.epp file and implement details for the

 I have need help implementing the function. It must use STL

list API. CS two lists. Modify the List.epp file and implement details

I have need help implementing the function. It must use STL list API.

CS two lists. Modify the List.epp file and implement details for the intersectionO function. The prototype for this function is as follows: template L1, list L2); The implementation will use the C++ Standard Template Library list implementation. The printO function provides an example on how to use an iterator for a given list. The result of the intersection O function will be the elements in the intersection of the two lists. If there are no common elements between the two given lists, then function will retrn NULL Hint: You may implement this function any way you like, but you must use the STL list API. Here are a few suggestion: Create two loops, one embedded within the other. Walk through the first list in the first loop in the outer loop using an iterator 1. typename list<:iterator itrl: for l1.begin itr l1.end tr1 walk through the second list in loop using another iterator t2 obiect ator itrend l2.endo: l2.begino: itr2 within check if value of itrl equal itr2. remember that iterators are pointers. they push contents one onto resultlist>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!