Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,987 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,401 people online right now. Registration is fast and FREE... Join Now!




Payroll program

 
Reply to this topicStart new topic

Payroll program

WHITJAQ
28 Nov, 2006 - 10:06 AM
Post #1

New D.I.C Head
*

Joined: 28 Nov, 2006
Posts: 7


My Contributions
NEED HELP WITH FINISHING THIS PROJECT, I GOT STUCK AND DONT KNOW WHERE TO GO NEXT I NEED TO BE ABLE TO ADD EMPLOYESS TO A SEQUENTIAL FILE READ THE SEQUENTIAL FILE, BE ABLE TO ASK FOR THE HRS WORKED FOR THE PAY PERIOD AND CALCULATE THE PAY AND DISPLAY THE INFO , ALSO THE PROGRAM NEEDS TO READ THE SEQUENTIAL FILE AND DISPLAY THE INFORMATION TO THE SCREEN IN A REPORT FORMAT, NEED AT LEAST 3 FUNCTIONS. I WILL HONESTLY ADMITT IM IN STRUGGLING WITH THIS ANY HELP WILL GREATLY APPRECIATED.
CODE
  #INCLUDE <IOSTREAM>
             # INCLUDE <IOMANIP>
              #INCLUDE <STRING>
               #INCLUDE <FSTREAM>
USING NAMESPACE STD;
//CONST INT maxNumberOfEmployee = 26;
//void getEmployeeData (ifstream& infile, employeeName employeeList[], int numberOfEmployee);
//voif printpayReports (ofstream& outfile, employeename employeeList[], int numberOfEmployee, double payRate);

int main()
{
string fName;
stringlName;
string address;
int noOfDependents'
char mstatus;
double deduction;
int count;
count = 0,

do
{
cout << "enter the First Name: ";
cin >> fName;
cout << endl;

cout << "enter the last name: ";
cin >> lName;
cout << endl;

cout << "enter the address: ";
cin >> address;
cout << endl;

cout << "enter M(arried) or S(ingle): ";
cin >> mstatus;
cout << endl;

cout << "How much you want us to deduct for 401k plan ?";
cin >> deduction;
cout << endl;

count = count + 1;
}
while (count <=26);


where do i go from here some one help me please.
User is offlineProfile CardPM
+Quote Post

skyhawk133
RE: Payroll Program
28 Nov, 2006 - 10:13 AM
Post #2

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 15,276



Thanked: 61 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
CAPSLOCK--;
User is online!Profile CardPM
+Quote Post

y0da
RE: Payroll Program
28 Nov, 2006 - 10:15 AM
Post #3

D.I.C Head
Group Icon

Joined: 8 Nov, 2006
Posts: 62


Dream Kudos: 75
My Contributions
If I had $5 for everytime someone asked for help with a payroll program, I would be on my way to living with bill gates....

Not really but still....
User is offlineProfile CardPM
+Quote Post

Dark_Nexus
RE: Payroll Program
28 Nov, 2006 - 10:22 AM
Post #4

or something bad...real bad.
Group Icon

Joined: 2 May, 2004
Posts: 1,309



Thanked: 3 times
Dream Kudos: 625
My Contributions
if i had $5 for everytime someone post whored, i'd be pretty wealthy too.
User is offlineProfile CardPM
+Quote Post

okyup
RE: Payroll Program
28 Nov, 2006 - 10:27 AM
Post #5

D.I.C Head
Group Icon

Joined: 6 Nov, 2006
Posts: 207


Dream Kudos: 175
My Contributions
You need a vector<struct> container that is filled by reading the file.
User is offlineProfile CardPM
+Quote Post

WHITJAQ
RE: Payroll Program
28 Nov, 2006 - 12:00 PM
Post #6

New D.I.C Head
*

Joined: 28 Nov, 2006
Posts: 7


My Contributions
QUOTE(okyup @ 28 Nov, 2006 - 11:27 AM) *

You need a vector<struct> container that is filled by reading the file.

does that mean that i need to make a file that will have the names and other information in it in notepad
User is offlineProfile CardPM
+Quote Post

okyup
RE: Payroll Program
28 Nov, 2006 - 01:13 PM
Post #7

D.I.C Head
Group Icon

Joined: 6 Nov, 2006
Posts: 207


Dream Kudos: 175
My Contributions
QUOTE(WHITJAQ @ 28 Nov, 2006 - 01:00 PM) *

QUOTE(okyup @ 28 Nov, 2006 - 11:27 AM) *

You need a vector<struct> container that is filled by reading the file.

does that mean that i need to make a file that will have the names and other information in it in notepad


Well thats what you said in the original post. Google c++ vectors if you are not familiar with them. I suggest opening the file, loading it into a vector, editting it however the user wants, and then saving it back to the file before exit.
User is offlineProfile CardPM
+Quote Post

WHITJAQ
RE: Payroll Program
28 Nov, 2006 - 05:19 PM
Post #8

New D.I.C Head
*

Joined: 28 Nov, 2006
Posts: 7


My Contributions
QUOTE(okyup @ 28 Nov, 2006 - 02:13 PM) *

QUOTE(WHITJAQ @ 28 Nov, 2006 - 01:00 PM) *

QUOTE(okyup @ 28 Nov, 2006 - 11:27 AM) *

You need a vector<struct> container that is filled by reading the file.

does that mean that i need to make a file that will have the names and other information in it in notepad


Well thats what you said in the original post. Google c++ vectors if you are not familiar with them. I suggest opening the file, loading it into a vector, editting it however the user wants, and then saving it back to the file before exit.


OK BUT IM STILL STUCK ON WHAT TO DO AS FAR AS FINISHING MY PROGRAM, IM REALLY DUMB WHEN IT COMES TO C++ AND IT TAKES ME A WHILE TO ACTUALLY GET SOMETHING MORE HELP WOULD BE GREATLY APPRECIATED!!!!
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 1/8/09 07:38PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month