Passing a Linked List to Function LeetCode Add2number
I was doing a leetcode problem and realized I’ve never passed a linked list to a function before. So, now I’m attempting to implement a linked list using a class that inherits the structure of a linked list. In my main code I’m attempting to pass a ListNode* type to the function add2numbers that is a replica of the leetcode problem along with the structure. From what I see in the watch window, Num_List *list; contains all the data of the linked list I just made but I can’t pass that due to a type complaint because its from the Num_List class.