Sorting-Struct

I'm currently working with a struct, node.
1
2
3
4
5
6
7
struct Node
{
	int studentid;
	string studentinitials;
	double testscore;
	Node *next;
};

I'm currently using it as a linked list, but i'm wondering how i would go about sorting this linked list by the value of studentid as each new Node is added
closed account (2NywAqkS)
you could use vectors
I've looked into that, but i'd like to keep them in Nodes instead of using vectors, and just sorting them into the linked list as they get entered in
Topic archived. No new replies allowed.