Mar-17-2020, 04:11 AM
It would be helpful if you would keep your code together as a unit and reference by line numbers in your dialogue.
Is add_node method of AdjacencyList?
If so, I'm not sure about creating an instance of class (new_node) within method looks dangerous at minimum,
but my head is yelling at me that it's not going to be OK.
At a minimum, your sort would have to be on new_node, and not on a class definition (AdjacencyList)
thus the warning:
Is add_node method of AdjacencyList?
If so, I'm not sure about creating an instance of class (new_node) within method looks dangerous at minimum,
but my head is yelling at me that it's not going to be OK.
At a minimum, your sort would have to be on new_node, and not on a class definition (AdjacencyList)
thus the warning:
Quote:Access to a protected member _name of a class