Question: Hi I need one C++ function that is missing on this code. I need Unzip Function. Unzip function is missing . Please complete Unzip function

Hi I need one C++ function that is missing on this code.Hi I need one C++ function that is missing on this code. I need Unzip Function. Unzip function is missing .

Please complete Unzip function So far I have Cat, Grep, Zip.. I need Unzip function

cmd running command

gcc

example

gcc function_1.cpp

// function_1.cpp

///////////////

//Function for CAT :

#include #include

using namespace std;

int main(int argc,char *argv[]) { ifstream in; // one argument if(argc

I need Unzip Function. Unzip function is missing . Please complete Unzip

/////////////////////

// function2.cpp

////////////////////////////////

//FUNCTION FOR GREP

#include #include #include

using namespace std;

int main(int argc,char *argv[]) { ifstream in;

// one argument if(argc

string line; // read each line while(getline(in,line)){ // if string found in line if(line.find(argv[2])!=-1){ // print the line cout

// close file in.close();

return(0); }

function So far I have Cat, Grep, Zip.. I need Unzip function

////////////

// function3.cpp

////////////////////////

//FUNCTION FOR ZIP

#include #include #include #include

using namespace std;

// to encode string

string zip(string str) { // to store encode string string ret=""; // get length of string int len=str.length(); // read each character in a string for(int i=0;i>add; ret+=add; } } // return encoded string return(ret); }

int main(int argc,char *argv[]) {

ifstream in; // one argument if(argc

return(0);

}

Requirements wcat is passed in a file and will output the file on the terminal (use cat to familiarize yourself with how this should work) wgrep is passed 2 arguments, the first is the word or words that the user is looking for and the second argument is the file that should be searched (use grep to familiarize yourself with this) wzip is passed a text file and redirects it to a compressed zip file wunzip is passed a zip file and prints out the unzipped file in standard output E:\programc++>function_1 cat testAli.txt This is test for all. adadddddd adadadddd All I have and all line go and I hope they are working solid test it iss E:\programc++> E:\programc++>function2 grep is testall.txt This is test for all. solid test it is E:\programc++>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!