Please help with C++ question ASAP

This is a discussion on Please help with C++ question ASAP within the C++ Programming forums, part of the General Programming Boards category; I have to write a program and i am having trouble writing part of it. I have to read information ...

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    13

    Please help with C++ question ASAP

    I have to write a program and i am having trouble writing part of it.
    I have to read information from a file about students. This file contains their names, graduation year and GPA. I need to compare the GPA's of all the students in the file.The class information is stored in an array of structs.Please help me with the code that will find the student /students with the highest gpa.

    Angel

  2. #2
    Registered User
    Join Date
    May 2002
    Posts
    85
    Please post your code even it does not compile, then we could help.

    You can use bubble sort or quick sort algorithm to find highest GPA of students.
    DV007
    Last edited by dv007; 02-05-2006 at 01:40 PM.

  3. #3
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    and don't demand instant help. We're not here at your beg and call to command as your personal slaves.
    Ask nicely and you'll find lots more sympathy.

  4. #4
    Cat Lover
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    109
    If all you need is the highest you could just search through, keep track of the highest. If the new one is higher than the current one.

  5. #5
    Registered User
    Join Date
    Feb 2006
    Posts
    13
    jwenting i did not demand instant help. I said as soon as possible. I asked nicely saying please at least twice. I did not ask you to write huge chunks of code for me or anything i just wanted to know what the best way to do something was. So next time if you have a problem with something keep it to yourself.

  6. #6
    Registered User
    Join Date
    Feb 2003
    Posts
    62
    I could tell that C++angel your find its the people on here the longest that are the most rude. Anyway I may or may not be able to help, let me know

    Chris

  7. #7
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,656
    Enough already.

    C++angel, help comes when you post some code (ie, real effort), not just copy/pasting your assignment.
    When you can do this, post your code and question in another thread.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 12:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21