how to make a linked list to sort acsending order

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2007
Posts: 1
Reputation: ravindueklum is an unknown quantity at this point 
Solved Threads: 0
ravindueklum ravindueklum is offline Offline
Newbie Poster

how to make a linked list to sort acsending order

 
0
  #1
Sep 11th, 2007
  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++)
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 1,496
Reputation: WolfPack has a spectacular aura about WolfPack has a spectacular aura about WolfPack has a spectacular aura about 
Solved Threads: 104
Moderator
WolfPack's Avatar
WolfPack WolfPack is offline Offline
Mentally Challenged Mod.

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

 
0
  #2
Sep 11th, 2007
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 2751 | Replies: 1
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC