Implementing a singly linked list in C++ I'm really just looking for some advice on my current code and with moving forward. As you can see, I have a pointer to my student list and data (which just haven't been made yet).

#include&lt;iostream&gt;
#include&lt;cstdio&gt;
#include&lt;cstdlib&gt;

using namespace std;

class List{ //Building the base of the program, being the nodes, and initializing the functions of the list
    private:
        typedef struct node {
            int student_number;
            int class_number;
            struct node* classpointer;
            struct node* studentpointer;
        }* nodePtr; //condensing node structure to simply "nodePtr"

        nodePtr head;
        nodePtr curr;
        nodePtr temp;

    //functions that I will be using
    public:
        List();
        void addNode();
        void PrintList();
};
//initialize the list pointers
List::List() {
    head = NULL;
    curr = NULL;
    temp = NULL;
}
//function to add a node to the linked list
void List::addNode() {
    nodePtr n = new node;
    n-&gt;classpointer = NULL;

    cout &lt;&lt; "What value would you like to add?" &lt;&lt; endl;
        int x;
    cin &gt;&gt; x;
    n-&gt;class_number = x;

    if(head != NULL) {
        curr = head;
        while (curr-&gt;classpointer != NULL) {
            curr = curr-&gt;classpointer;
        }
        curr-&gt;classpointer = n;
    }
    else {
        head = n;
    }
}

void List::PrintList() {
    curr = head;
    while(curr != NULL) {
        cout &lt;&lt; " " &lt;&lt; endl;
        cout &lt;&lt; curr-&gt;class_number &lt;&lt; endl;
        curr = curr-&gt;classpointer;
    }
}

int menu() {
    int input;
    List List;
    while (input != 3) {
        cout &lt;&lt; " " &lt;&lt; endl;
        cout &lt;&lt; "Press '1' to input a node" &lt;&lt; endl;
        cout &lt;&lt; "Press '2' to view the list of nodes" &lt;&lt; endl;
        cout &lt;&lt; "Press '3' to exit" &lt;&lt; endl;
        cout &lt;&lt; " " &lt;&lt; endl;
        cin &gt;&gt; input;
        if (input == 1) {
        List.addNode();
        }
        else if (input == 2) {
        List.PrintList();
        }
        else if (input == 3) {
            return 0;
        }
        else {
        cout &lt;&lt;"That is an invalid key" &lt;&lt; endl;
        }
    }
}

int main() {
    int i;
    for (i=0; i &lt; 500; i++) {
        menu();
    }
}
Unnecessary member variables

You have a member variable curr that has no purpose as a member variable, because it is only used as a temporary pointer to iterate through your list.  You should make curr simply be a local variable in the functions it is used in.

The member variable temp is never used and should be deleted.

\$O(n)\$ add

Your addNode function takes linear time because it has to find the end of the list.  You should either add to the beginning of the list, or keep a tail pointer so that you can quickly add to the tail.