Thread: Help With C++ Program!!!

  1. #1
    Registered User
    Join Date
    Feb 2008

    Unhappy Help With C++ Program!!!

    Create a C++ program that will accept the inputs, and allow the user to view the data ordered by ID# or by student name.


    Welcome to Larry's Friendly Roster Program.
    Choices for commands are:
    A = Add: Enter more data
    I = ID: View the data in ID# order
    N = Name: view the data in Name order
    Q = Quit

    Enter your choice (A,I,N,Q) : A
    Enter ID# 874527
    Enter Name: Bill Farmer

    Enter your choice (A,I,N,Q) : A
    Enter ID# 621837
    Enter Name: Sally Andrews

    Enter your choice (A,I,N,Q) : I
    CWID Name
    621837 Sally Andrews
    874527 Bill Farmer

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Rishon LeZion, Israel
    So where is the code you need help with? Show it first - then ask the question
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

  3. #3
    Join Date
    Feb 2008
    Don't you have any idea of where to start from?

    First you need to create a loop in wich your program recognizes the user's input.

    Try and post your code so we can figure out what is your c++ knowledge level.

  4. #4
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    It would be better to use an array/vector too with this.
    Double Helix STL

  5. #5
    Registered User
    Join Date
    Feb 2008
    ......anyone else....

  6. #6
    Join Date
    Oct 2007
    Inside my computer
    No. Show us what you've done and ask specific questions about what you need help with.
    We don't do someone else's homework - we help them do it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    Registered User
    Join Date
    Feb 2008
    so what exactly are u trying to do

  8. #8
    Use this: dudeomanodude's Avatar
    Join Date
    Jan 2008
    Hampton, VA
    What parts of the language are you allowed/supposed to use? If this is homework, obviously you know what you're allowed to use in order to get it done.

    Are you allowed to use classes/structs to store the info or only ints and strings?

    Can you use an STL header like <algorithm> to do the sorting or do you have to come up with your own sorting function?

    These are the little bits of info people here will need in order to help you (not to mention some code and effort on your part).
    Ubuntu Desktop
    Geany (for quick projects)
    Anjuta (for larger things)

  9. #9
    I eat babies
    Join Date
    Jan 2008
    Read the policy on homework, we don't do homework for you, and nobody should. Post the code you have or go somewhere else.
    There are only 10 types of people, those who understand binary and those who don't
    C++ Beginner
    Visual C++ 2008 Express Edition!
    Windows XP

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, 10:04 PM