Question: C++ assignment. Please help me to complete this code: #include #include using namespace std; // Write your function here //////////////// STUDENT TESTING //////////////////// int run()

C++ assignment. Please help me to complete this code:

#include #include using namespace std;

// Write your function here

//////////////// STUDENT TESTING //////////////////// int run() { cout << "Student testing" << endl; strip(); return 0; }

Here is the instruction:

Write a filter function named strip that removes C++ comments from input, sending the uncommented portion of the program to output. Your program should work with both single line (//) comments, and multi-line (/* */) comments.

+ A "/*" sequence is ended by the first "*/" that is encountered. + Comment characters inside string literals "don't count" + Strings quotes may be escaped using an escape character. + Single-line comments // may be included inside multi-line comments Because this is a filter, you program will read from cin and write to cout.

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!