ASDV-Cpp/Assignments/StructuresLab_CalebFontenot/main.cpp

29 lines
840 B
C++
Raw Normal View History

2024-03-22 11:48:19 -05:00
#include <iostream>
#include "structures.h"
struct Payroll
{
int empNumber; // structures Number
std::string name; // structures's name
double hours; // Hours worked
double payRate; // Hourly pay rate
double grossPay; // Gross pay
std::string toString() {
std::string str = "";
str.append("Payroll Number: ").append(std::to_string(empNumber)).append("\n");
str.append("Payroll Name: ").append(name).append("\n");
str.append("Payroll Hours:" ).append(std::to_string(hours)).append("\n");
str.append("Payroll payRate: ").append(std::to_string(payRate)).append("\n");
str.append("Payroll grossPay: ").append(std::to_string(grossPay)).append("\n");
return str;
};
};
int main() {
Employee e;
std::cout << e.toString() << std::endl;
return 0;
}