Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#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 #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 = 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. image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Here is the main function that you must use. You may not add or remove parameters or change the names of the variables. You must initialize the values of the variables.: int main (int argc, char argv)t //Check correct number of argument:s if ( argc != 5 ) { cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions