CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: help with c++

  1. #1
    Join Date
    Aug 2010
    Posts
    51

    help with c++

    i need your help in creating a program that allows the user to enter a payroll code. The Program should search for the payroll code in the code in the file and then display the appropriate salary. If the code is not in the file, the program should display an appropriate message. Use a sentinel value to end the program.

    if you can write it would be greatly appreciated


    here is what i have so far(i need help writing the rest).


    int main()
    {
    int payroll, salary, cont=1;
    while (cont)
    {
    getPayrollCode(&payroll);
    getSalary(payroll, &salary);
    if (getUserReq())
    {
    cont=0;
    }


    }
    return 0;
    }

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: help with c++

    Well, clearly you're intended to define the functions getPayrollCode(), getSalary(), and getUserReq(). So why don't you start by adding those function skeletons. The parameters and return values (if any) of each should be clear enough based on how they're used.

    Two of the functions will be simple user input; the third will require file input and interpretation. None is particularly difficult though.

  3. #3
    Join Date
    May 2002
    Location
    Lindenhurst, NY
    Posts
    867

    Re: help with c++

    http://www.codeguru.com/forum/showpo...25&postcount=3

    ...and now you're up to 49.

    Quote Originally Posted by ade161 View Post
    if you can write it would be greatly appreciated

  4. #4
    Join Date
    Apr 2009
    Posts
    21

    Re: help with c++

    What an ambiguous question. What do you exactly mean with "The Program should search for the payroll code in the code in the file"? Will your program need to read some type of code to perform computations? In that case you will have to write a parser.

  5. #5
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: help with c++

    Quote Originally Posted by Martin O View Post
    You should also know by now that nobody here is going to just do your homework for you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured