Question: how can i fix this ? ------------ void strip() { bool inString = false; /ot in a string bool inSingleCmt = false; /ot inside a

how can i fix this ?

------------

void strip() { bool inString = false; /ot in a string bool inSingleCmt = false; /ot inside a single-line comment bool inMultiCmt = false; // not inside in a mulit-line comment char ch; while (cin.get(ch)) { if(cin && !inSingleCmt && !inMultiCmt) cout.put(ch); if (inSingleCmt && ch == ' ') { inSingleCmt = false; } else if (inString && ch == '\\' && cin.peek() == '"') { inString = false; } else if (inMultiCmt && ch == '*' && cin.peek() == '/') { cin.get(ch); cin.get(ch); inMultiCmt = false; } else if (!(inSingleCmt) && !(inMultiCmt) && !(inString)) { if (ch == '"') { inString = true; } if (ch == '/' && cin.peek() == '*') { inMultiCmt = true; } if (ch == '/' && cin.peek() == '/') { inSingleCmt = true; } else if (inString && ch == '\\' && cin.peek() == '"') // \" { cout.put(ch); cin.get(ch); } } }

}

how can i fix this ? ------------ void strip() { bool inString

Checking function: Checking the strip function. X Check single-line expected [#include #include ] but found [#include Check X string-embedded single, cout Check multi-line comments. : [ #include ] but found [//#include + Check string-embedded comment II.->chars "Some text /* with an embedded*/// comment"; X Check single-line embedded comment.: expected [int main(int argc , argv[l )1 but found [int main(int argc / argvll /] x string, then multi, then string. : expected [string s = "\"hello\""; string s2 = "bye" ; ] but found [stri s + Some escaped quotes in a string.-> string s = ..\"/ot a comment\"/ot a comment..; ng "\"hello\""; /* cmt1 */ string s2-"bye"; /* cnt2 */j = Tests passing 3/7 (43%)

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!