Sorting-Struct

Feb 25, 2012 at 7:05pm
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
Feb 25, 2012 at 7:09pm
closed account (2NywAqkS)
you could use vectors
Feb 25, 2012 at 9:58pm
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.