Node * start = NULL;
int sid;
int target;
string init;
double test;
do
{
Node * curr = new Node;
cout << "Enter the Student ID Number:";
cin >> sid;
if(sid==-999) break;
curr->studentid = sid;
cout << "Enter the Initials:";
cin >> init;
curr->studentinitials=init;
cout << "Enter the test score:";
cin >> test;
curr->testscore=test;
curr->next = start;
start = curr;
cout << "Node with ID = " << curr->studentid << ", Initials = " << curr->studentinitials << ", and test-score=" << curr->testscore <<" added to the end of the list.\n";
}while(true);
This is how the nodes are currently inserted. I'm just looking for some general guidance on how to sort nodes into order by their Student ID as they get entered in. Thanks!