Ask your own question, for FREE!
Computer Science 10 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
randogirl123: helpss
5 hours ago 17 Replies 0 Medals
DonaldTrumpofQC: QC Halloween Profile Picture requests
9 hours ago 3 Replies 1 Medal
Taku12: is it nessicary to learn formulations of 3x3 applications?
6 hours ago 28 Replies 2 Medals
Allisianna: Lwk dnt know how to send vms but ima try.
1 day ago 14 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!