Okay so i'm gonna start with the old cliche "I'm new to C++...", I dont understand the use of the getNext() setNext() etc functions i am supposed to implement in my ListNode.cpp file..

Code:
class ListNode{
    private:
        Person* data;
        ListNode* next;
    
    public:
        ListNode* getNext();
        void setNext(ListNode* n);
        Person* getData();
        void setData(Person* p);
}
I am trying to create a chained hash table implementing a singly linked list, I thought i could just use pointers in the LinkedList.cpp implementation to minipulate the nodes and their data when adding and deleting?? Or have i got this all backwards and the get and set methods are something else entirely??

I'm sorry if this is a silly question, im still trying to understand a lot of these concepts. If I have left out anything feel free to ask..

Thanks