-
November 3rd, 2010, 11:30 AM
#1
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;
}
-
November 3rd, 2010, 11:36 AM
#2
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.
-
November 3rd, 2010, 11:40 AM
#3
Re: help with c++
http://www.codeguru.com/forum/showpo...25&postcount=3
...and now you're up to 49.
Originally Posted by ade161
if you can write it would be greatly appreciated
-
November 3rd, 2010, 12:07 PM
#4
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.
-
November 3rd, 2010, 12:53 PM
#5
Re: help with c++
Originally Posted by Martin O
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|