Ask
your own question, for FREE!
Computer Science
23 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
Ferrari:
Is there ever a point in time where humans can time travel? Just an open question.
danielfootball123:
Quick question. Why is there no questioncove logo on the site anymore? (screensho
Twaylor:
how do i stitch up my leg ( i need real answers people- i dont want to do it wron
danielfootball123:
not sure if this is spam or not Please keep this in your prayers. Just watch this video https://www.
danielfootball123:
Why was questioncove down? and how did everything open up today without reaching
PureSoulless:
is staying at your friend's house while you're homeless legal.
whyjustwhy:
i did that one TV girl trend with blake (aka @ShadowKid3)
54 minutes ago
12 Replies
2 Medals
1 day ago
10 Replies
1 Medal
1 day ago
16 Replies
4 Medals
4 days ago
11 Replies
0 Medals
1 week ago
7 Replies
5 Medals
2 weeks ago
5 Replies
1 Medal
1 week ago
12 Replies
2 Medals