C++ File Operation Challenge

Write my research paper
Shall I compare thee to a summer’s day?
Thou art more lovely and more temperate:
Rough winds do shake the darling buds of May,
And summer’s lease hath all too short a date:
Sometime too hot the eye of heaven shines,
And often is his gold complexion dimm’d;
And every fair from fair sometime declines,
By chance, or nature’s changing course, untrimm’d;
But thy eternal summer shall not fade
Nor lose possession of that fair thou ow’st;
Nor shall Death brag thou wander’st in his shade,
When in eternal lines to time thou grow’st;
So long as men can breathe or eyes can see,
So long lives this, and this gives life to thee.2. Add the following code to your Main():int main() { std::ifstream in_file {“../poem.txt”}; std::ofstream out_file{“../poem_out.txt”}; if (!in_file) { std::cerr << "Error opening input file" << std::endl; return 1; } if (!out_file) { std::cerr << "Error opening output file" << std::endl; return 1; } std::string line{}; while (std::getline(in_file, line)) out_file << line << std::endl; std::cout << "File copied" << std::endl; in_file.close(); out_file.close(); return 0;}3. Analyze the code, fully understand it, and Change the code to manipulate the file and add a line number to the beginning of each line.your output should look like this:1 Shall I compare thee to a summer's day?
2 Thou art more lovely and more temperate:
3 Rough winds do shake the darling buds of May,
4 And summer's lease hath all too short a date:
5 Sometime too hot the eye of heaven shines,
6 And often is his gold complexion dimm'd;
7 And every fair from fair sometime declines,
8 By chance, or nature's changing course, untrimm'd;
9 But thy eternal summer shall not fade
10 Nor lose possession of that fair thou ow'st;
11 Nor shall Death brag thou wander'st in his shade,
12 When in eternal lines to time thou grow'st;
13 So long as men can breathe or eyes can see,
14 So long lives this, and this gives life to thee.4. Copy your code and paste it here (text input).Purchase the answer to view itPurchase the answer to view it
This is property of essayprince.com. We provide the best Online writing service to our students. Log in today to get access to notch papers

Don't use plagiarized sources. Get Your Custom Essay on
C++ File Operation Challenge
Just from $8/Page
Order Essay
Calculator

Calculate the price of your paper

Total price:$26

Need a better grade?
We've got you covered.

Order your paper
Open chat
1
Hello Good Friend
We are here at your service.
How can we help you today?

Order your paper today and save 16% with the discount code SUMMERFEST020