c++ program

This is a discussion on c++ program within the C++ Programming forums, part of the General Programming Boards category; hi i need help in this program . about an orderd dynamic linked list of records for a class of ...

  1. #1
    a_a
    a_a is offline
    Registered User
    Join Date
    May 2003
    Posts
    11

    Unhappy c++ program

    hi i need help in this program . about an orderd dynamic linked list of records for a class of student. each record heve the following components
    -student name
    -array of integer for student marks
    -a float of average mark
    -a char for student letter grade

    and the program will make the following operation
    -add student to the list so the list remains ordered
    -delete a student from the list given student name
    -change the marks of a students given student name
    -list the record of student given the student name

    i know that program is too long but i need help in the operation
    and thank you

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    Try: studying.

  3. #3
    a_a
    a_a is offline
    Registered User
    Join Date
    May 2003
    Posts
    11
    hi i study but i want to know the solution so i can understand
    the linked list , i search for web site to learn it but no good web site
    so what i do !

  4. #4
    a_a
    a_a is offline
    Registered User
    Join Date
    May 2003
    Posts
    11

    Smile

    thank you very much salem

  5. #5
    a_a
    a_a is offline
    Registered User
    Join Date
    May 2003
    Posts
    11

    Unhappy

    i search but ididnt find what i want plz help
    i really need to understand this program

  6. #6
    a_a
    a_a is offline
    Registered User
    Join Date
    May 2003
    Posts
    11
    i think die is more easy to me than solve this program

  7. #7
    a_a
    a_a is offline
    Registered User
    Join Date
    May 2003
    Posts
    11
    hi
    first of all im not boy im girl
    then i always go to lessons
    i know what struct
    i dont want you to solve the program
    i want help in the operation add /delete /find

    i have a problem with our teacher he is very bad in teaching c++

  8. #8
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    1)Since you know what a struct is--if you know what a class is since this is C++ I recommend you use a class instead--do the first part of the problem, which is telling you to create a class with the following data members:

    each record heve the following components
    -student name
    -array of integer for student marks
    -a float of average mark
    -a char for student letter grade

    2) Then for a linked list, you need to create a second class which connects all the objects of your first class. Typically, the linked list class will have several pointers as data members. Each linked list object will have a pointer to one student object, a pointer to the next object in the list, or NULL if it's the last object in the list, and a pointer to the first object in the list, and finally a pointer to the last object in the list.
    Last edited by 7stud; 05-31-2003 at 03:44 PM.

  9. #9
    a_a
    a_a is offline
    Registered User
    Join Date
    May 2003
    Posts
    11
    we didnt study class
    not in our subject

  10. #10
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    Then use structs.

  11. #11
    a_a
    a_a is offline
    Registered User
    Join Date
    May 2003
    Posts
    11
    i think no body here can solve it

  12. #12
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    It's fairly complicated, so draw a picture of what you are doing, and just program one step at a time. Post what code you have and someone can help you at each step.

    There are probably 500 people that post to this forum that can solve that program, which is taught in every C++ class, and things 10 times more complex.

  13. #13
    Registered User HaLCy0n's Avatar
    Join Date
    Mar 2003
    Posts
    77
    Its not that we can not solve the problem. We are not here to do your homework. If you post some code showing what you have done and the problems you have, we can help you.

  14. #14
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    Here is what the elements of the List struct should look like:
    Code:
    struct List
    { 
        student* pstudent;
        List* pstart;
        List* pend;
        List* pnext;
    }
    Last edited by 7stud; 05-31-2003 at 04:22 PM.

  15. #15
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    Here's a tutorial on linked lists in C:

    http://cslibrary.stanford.edu/103/

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Issue with program that's calling a function and has a loop
    By tigerfansince84 in forum C++ Programming
    Replies: 9
    Last Post: 11-12-2008, 01:38 PM
  2. Need help with a program, theres something in it for you
    By engstudent363 in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 01:41 PM
  3. Replies: 4
    Last Post: 02-21-2008, 10:39 AM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 11:04 PM

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