#include #include #include #include "Contestant.h" using namespace std; // Function Prototypes void printdata(Contestant); int main() { Contestant contestant1; Contestant contestant2("Jane","Smith",'F'); Contestant contestant3("Jack","Smith",'M', "Black", 27, "Lawyer", 98765.43); printdata(contestant1); printdata(contestant2); printdata(contestant3); //system("pause"); return 0; } /* Function printdata: */ void printdata(Contestant contestant) { // open output file // ofstream dbfile("c:\\bc\\cis1_5\\newpgms\\chapter10\\myoutput.txt"); //comment-out for debugging ofstream dbfile("con"); //un-comment for debugging dbfile << "Name\t\tGender\tHair\tAge\tTitle\tSalary" << endl; dbfile << contestant.getFirstname(); dbfile << " " << contestant.getLastname(); dbfile << "\t" << contestant.getGender(); dbfile << "\t" << contestant.getHaircolor(); dbfile << "\t" << contestant.getAge(); dbfile << "\t" << contestant.getJobtitle(); dbfile << "\t" << contestant.getJobsalary(); dbfile << endl << endl << endl; dbfile.close(); return; }