Question: #include #include #include #include using namespace std; void readFile(string inputFileName, string *words, int num){ ifstream fin; char *p = &inputFileName[0]; fin.open(p); for (int i =
#include
using namespace std;
void readFile(string inputFileName, string *words, int num){ ifstream fin; char *p = &inputFileName[0];
fin.open(p);
for (int i = 0; i } void writeFile(string outputFileName, string *words, int num){ ofstream fout; char *p; p = &outputFileName[0]; fout.open(p); for (int i = 0; i } int main(int argc, char **argv){ //Check correct number of arguments if (argc != 5) { cout //Handling cmd line args //YOU MUST INITYIALIZE THEIR VALUES string inputFileName = argv[1]; string outputFileName = argv[2]; int numberOfWords = atoi(argv[3]); char *lettersToReplace; char *p; int found; //Checking valid input if (numberOfWords I have this code, but I need to create a replaceWords function as instructions show. How can I do this? This language is c++. Please add the replaceWords function to the current code. 
![int num){ ifstream fin; char *p = &inputFileName[0]; fin.open(p); for (int i](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f5a5008c127_59266f5a50011a31.jpg)

![fout; char *p; p = &outputFileName[0]; fout.open(p); for (int i = 0;](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f5a50208442_59366f5a5019c3a0.jpg)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
