Ask
your own question, for FREE!
Computer Science
10 Online
A link list problem, i need some how to sort and print out an object by surname in alphabetical order. i have a try to do that by this code not working for swamping i should i go about that? void functions::printdata() { for(node* temp1=head;temp1!=NULL;temp1=temp1->next) { for(node* temp2=head;temp2!=NULL;temp2=temp2->next) { if(temp2->client.getsurname() > temp1->client.getsurname()) { clienttype swap=temp1->client; temp1->client=temp2->client; temp2->client=swap; } } }
Still Need Help?
Join the QuestionCove community and study together with friends!
Did you try looking at the values and types of your assorted objects to make sure you don't have any oddities happening there? Like an address getting confues with a value.
Oh i joke my self with it.
Can't find your answer?
Make a FREE account and ask your own questions, OR help others and earn volunteer hours!
Join our real-time social learning platform and learn together with your friends!
Join our real-time social learning platform and learn together with your friends!
Latest Questions
MrMystery:
What cultural clashes happened at the arrival of Cortes in the Americas in 1519,
elianabany:
How can I study over trig functions using numeral methods in a mannerly time to b
danielfootball123:
Daniel was playing football with his friends at a church, and he saw a girl actually a very pretty one.
DonaldTrumpofQC:
BUICK - Big Ugly Import Car Killer CHEVY - Can Hear Every Valve Yell (or Cannot H
AsianPanda08:
For my english project i need to ask and get at least 5 responses from different
4 hours ago
4 Replies
3 Medals
6 hours ago
12 Replies
1 Medal
14 hours ago
20 Replies
2 Medals
22 hours ago
0 Replies
0 Medals
1 day ago
27 Replies
2 Medals