Hello, i am working on this chunk of code from a textbook and im kinda stuck. The code purpose is to help explain lists in c++. Im supposed to define the member functions find and erase and so far i have this.
What i noticed was that the find function is not doing its job. I know that if the function wasn't a member function of Link i could write the function like this
1 2 3 4 5 6 7 8
Link* find(link* p. const string& s){
while (p) (
)
if (p->value == s) return p;
p = p->succ;
return 0;
}
giving the value of succ to p. But when using this i know you can't assign it a new value. What im confused is that im stuck as to how to fix it. All im asking is for some guidance so if you could i would definitely appreciate it.