|
Assume you are in main.cpp define a function that is NOT SCOPED to any class. It is NOT a member of the ListInterface nor LinkedList classes. Your function should accept two lists. You will remove all values from the first list that are present in the second list. Example:
Lists before call: Lists after call:
target: A, B, C, A, D, C, E, F, B, C, A target: A, A, D, E, F, A
toRemove: C, B, Q, Z toRemove: C, B, Q, Z
template <typename T>
void removeHelper(ListInterface<T>& target, const ListInterface<T>& toRemove) {
//your code below
|
上一篇: new创建内存下一篇: [C++]自己写了个简单的xml解析,求大佬指点(多图警告)
|