solve this DLL question with use class not struct in c++
Find and Replace
Write the nonmember function int
replaceVal(DLList<T> &list, T f, T r) which
replaces every occurrence of the value f in the list with the value
r. The function should also return the total number of
replacements.
Example:
If the list myList has [ 7, 3, 5, 7, 7, 3, 8,
3]
then after calling
replaceVal(myList, 7, 5);
myList will contain [ 5, 3, 5,
5, 5, 3, 8, 3]
The function returns 3.
solve this DLL question with use class not struct in c++ Find and Replace Write the nonmember function int replaceVal(DL
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
solve this DLL question with use class not struct in c++ Find and Replace Write the nonmember function int replaceVal(DL
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!