Thread: C++ Programming\ Array Problem??

  1. #1
    Registered User
    Join Date
    Feb 2002

    C++ Programming\ Array Problem??

    Ok here is the situation. I am trying to create a program that will grade students exams for my class. I want to input a 30 answer key at the beginning followed by integer number that says how many students took the exam. Then I want to input the student answers followed by the students name. The output format contains the students name followed by the correct number of answers. If the student get a 60 or better it outputs that they passed, if they get 60 or below it tells them they fail. I have some ideas and I know the program will run smoothier if I use an array. If anyone has any sample programs or examples or knows where I can get some input on this problem I would appreciate it. Look forward to hearing from you.

  2. #2
    Registered User xds4lx's Avatar
    Join Date
    Nov 2001
    Hmm actually dont you think you should sit down and think about this one? This sounds perfect for class's. A Student class that holds the name, an array of their answers, and the number correct. Have some methods in your class that check the students answers against another array of answers(the Key!) and in that method have it add 1 to the total number corect for that student. If you want more help just email me and I can help more, I just dont want to type all this here now. Just giving a suggestion.
    "only two things are infinite, the universe and human stupidity, and im not sure about the former." - albert einstein

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Array problem
    By TomBoyRacer in forum C++ Programming
    Replies: 3
    Last Post: 04-08-2007, 11:35 AM
  2. Class Template Trouble
    By pliang in forum C++ Programming
    Replies: 4
    Last Post: 04-21-2005, 04:15 AM
  3. Replies: 6
    Last Post: 02-15-2005, 11:20 PM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Need desperate help with two dimensional array problem
    By webvigator2k in forum C++ Programming
    Replies: 4
    Last Post: 05-10-2003, 02:28 PM