cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Sorting-Struct
Sorting-Struct
Feb 25, 2012 at 7:05pm UTC
rocketman
(25)
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 UTC
closed account (
2NywAqkS
)
you could use vectors
Feb 25, 2012 at 9:58pm UTC
rocketman
(25)
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.