Question: This is my code: #include #include #include using namespace std; //Creating struct of footBallPlayerType struct footBallPlayerType{ string name; string position; int touchdown; int catches; int

This is my code:
#include
using namespace std;
//Creating struct of footBallPlayerType struct footBallPlayerType{ string name; string position; int touchdown; int catches; int pass_yards; int receive_yards; int rush_yards; };
//Creating functions //function to show Menu void showMenu(){ cout
//function to read a file void getData(ifstream &inputFile,footBallPlayerType list[],int size){ //index to update list int i=0; string nm,pos; int to,ca,pa,re,ru; while(i
//function to save data void savedata(ofstream &output,footBallPlayerType list[],int size){ output
//function to print Data void printData(footBallPlayerType list[],int size){ cout
//function to print Player's Data void printPlayerData(footBallPlayerType list[],int index){ cout
//Search data of player int searchData(footBallPlayerType list[],int size,string name){ for(int i=0;i //Updating touchdowns void UpdateTouchDowns(footBallPlayerType list[],int td,int index){ list[index].touchdown=td; } //Updating Catches void UpdateCatches(footBallPlayerType list[],int ca,int index){ list[index].catches=ca; } //Updating Passing void UpdatePassing(footBallPlayerType list[],int pa,int index){ list[index].pass_yards=pa; } //Updating Receiving void UpdateReceiving(footBallPlayerType list[],int re,int index){ list[index].receive_yards=re; } //Updating Rushing void UpdateRushing(footBallPlayerType list[],int ru,int index){ list[index].rush_yards=ru; } int main() { //Reading the file ifstream file("PackersData.txt"); int size;file>>size; footBallPlayerType list[size]; getData(file,list,size); bool flag=false; //Testing while(true){ showMenu(); cout>choice; cout>name; index=searchData(list,size,name); if(index==-1){ cout>name; cout>num; index=searchData(list,size,name); if(index==-1){ cout>name; cout>num; index=searchData(list,size,name); if(index==-1){ cout>name; cout>num; index=searchData(list,size,name); if(index==-1){ cout>name; cout>num; index=searchData(list,size,name); if(index==-1){ cout>name; cout>num; index=searchData(list,size,name); if(index==-1){ cout HOMEWORK #13-Header Files split the user-defined functions from HW #12 into two user-defined . cpp source files and . h header files, respectively. Place the functions that update information about the team or player (the five update functions) into an updatePlayer.cpp file and all other functions (aside from the main function) into an updateData.epp file. Create the appropriate header files, as necessary Re-compile your code and make adjustments until the program works identically to HW #12
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
