77 399
Assignments Done
Successfully Done
In July 2019

Answer to Question #38771 in C++ for James Moss

Question #38771
When calling this function once, it works fine. But when you call it a second time it won't return the employee record correctly. I need to write a test harness that verifies the problem and be able to inspect the string name, and Employee object r after the second call.

#include <iostream>

#include <string>

using namespace std;

Employee read_employee()


cout << "Please enter the name: \n";
string name:
getline(cin, name);
cout << "Please enter the salary: \n";
double salary"
cin >> salary;
Employee r(name, salary);
return r;

Expert's answer

Not answered

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions