Thread: Menu-Driven Program Help...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    9

    Menu-Driven Program Help...

    Hello,

    I have this menu-driven payroll program that's supposed to start out like this and perform the following options:

    Payroll Maintenance Program
    Main Menu

    1. Add a Record
    2. Display a Record
    3. Modify a Record
    4. Delete a Record
    5. Write Payroll File
    6. Read Payroll File
    7. Exit Program

    Enter your selection (1-7) ->


    so far I have option 1, 2, & 4 written in the code. I'm not sure how to do option 3. Anyways, when I try to test out what I have so far it won't seem to compile. I've tried debugging but I'm still stuck. =[ Can someone please point me out to the right direction? Any help would be great, thank you!

    here's my code so far: http://www.geocities.com/kitkatbar01/project6.htm

    -- ej

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    >>Anyways, when I try to test out what I have so far it won't seem to compile. I've tried debugging but

    you can't debug a program that will not compile without errors because the compiler does not (or should not) produce an executable program. You also want the program to compile with no warnings because most of the time warnings are really errors.

    what compiler are you using. compile it with Dev-C++ and the compiler will show you the errors. For example, the first error was at the end of struct employeeRecord declaration -- PayRecord *nextPayRecord; PayRecord is undefined symbol.

    Function pick1() -- you start a do loop but failed to end it with a while statement.
    Last edited by Ancient Dragon; 05-29-2006 at 03:06 AM.

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    9
    oh yeah, that's what i meant, it has errors. sorry for the confusion, i don't know why i said "debug" lol...but yeah, i'm having trouble fixing these errors

  4. #4
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Quote Originally Posted by eun-jin
    ..but yeah, i'm having trouble fixing these errors
    we all have that problem occasionally The first error reported is almost always the actual problem -- fix it (such as the do-loop problem I mentioned) and that will probably fix several others. Correct indentention will help you out a lot too -- don't just start each line in the left-most position.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 01:42 AM
  2. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  3. menu driven interface
    By weegi in forum C Programming
    Replies: 4
    Last Post: 04-17-2004, 04:08 PM
  4. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM
  5. c++ program with a button menu
    By quakegod in forum C++ Programming
    Replies: 0
    Last Post: 01-07-2002, 01:09 AM