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. 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
using namespace std;
int main(int argc,char *argv[]) { ifstream in; // one argument if(argc
/////////////////////
// function2.cpp
////////////////////////////////
//FUNCTION FOR GREP
#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); }
////////////
// function3.cpp
////////////////////////
//FUNCTION FOR ZIP
#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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started