In this exercise I am using Visual Studio 2017 and the std_lib_facilities header provided by Stroustrup.
Chapter 17 // Exercise 11, 1211. Complete the "list of gods" example from section 17.10.1 and run it.
12. Why did we define two versions of find().
Wow, linked lists are confusing. I never want to read prev->succ = prev if !prev then succ = prev->succ etc....
For exercise 12 I had to go read the small section in Chapter 18. Basically, it's to stop someone from change what Link* is pointing at. In the functions I try to always assign the pointer to a new temp pointer to avoid messing with the original. I feel like this is the same case here.
No comments:
Post a Comment