943,840 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 3820
  • C++ RSS
Sep 11th, 2007
0

how to make a linked list to sort acsending order

Expand Post »
C++ Syntax (Toggle Plain Text)
  1. struct student
  2. {
  3. char name[20];
  4. int math;
  5. int science;
  6. int history;
  7. int english;
  8. int total;
  9. }
how to create linked list that sort the details based on total in acsending order and how to prompt tot user to enter the student amount and marks between 0and100 just tell me the way .(C++)
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ravindueklum is offline Offline
1 posts
since Sep 2007
Sep 11th, 2007
0

Re: how to make a linked list to sort acsending order

1. Define the < operator for the student class and add the objects to a std::list.
2. Call the sort function of std::list and the list will be sorted.
3. Use std::cout to prompt the user, and std::cin to read the user input.
Moderator
Reputation Points: 572
Solved Threads: 115
Mentally Challenged Mod.
WolfPack is offline Offline
1,559 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: good C++ Win32 API Tutorial
Next Thread in C++ Forum Timeline: Contructors and destructors problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC