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
// 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
Get step-by-step solutions from verified subject matter experts
