Quantcast

A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

calyne

  • 2 years ago

C++ help with payroll program vector array of records; see attachments/links..

  • This Question is Closed
  1. calyne
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    here's the assignment: http://dl.dropbox.com/u/23228237/hw3.rtf here's my code: http://dl.dropbox.com/u/23228237/hw3.cpp here's the datafile: http://dl.dropbox.com/u/23228237/datafile.txt i'm on step 3. you can see my attempt at creating the basepay function (under the class Records) though i'm not really sure as to how i'm supposed to go about doing that with the vector and all. then in the main program when i try to execute it (right before closing the datafile towards the end) -- that i'm pretty sure i can't be doing properly either because for one thing it doesn't print anything, so i don't know what it's doing, if anything, but the program builds and compiles fine with zero errors.

  2. calyne
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    oh should i put it in a constructor? god damn it

  3. calyne
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    what the hell are you talking about

  4. eSpeX
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Are you talking to yourself? :)

  5. eSpeX
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    It looks to me like you are attempting to call your basepay function with this call: recordlist[i].basepay(employee.hours,employee.rate) however basepay is a (albiet commented out) variable in the records class. Try passing your function the hours and rate like this: for (int i=0; i<recordlist.size(); i++) { cout <<basepay( recordlist[i].employee.hours,recordlist[i].employee.rate) << endl; }

  6. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.