Ask your own question, for FREE!
Computer Science 23 Online
OpenStudy (anonymous):

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; } } }

OpenStudy (e.mccormick):

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.

OpenStudy (anonymous):

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!
Latest Questions
HeyItsAlicia: Mits midnight!!! Happy 16th bday to me !!
5 minutes ago 5 Replies 1 Medal
XShawtyX: Art
3 hours ago 1 Reply 1 Medal
RAVEN69: My drawing so far is actually fire
1 week ago 9 Replies 2 Medals
PureSoulless: is staying at your friend's house while you're homeless legal.
2 weeks ago 5 Replies 1 Medal
whyjustwhy: i did that one TV girl trend with blake (aka @ShadowKid3)
1 week ago 12 Replies 2 Medals
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!