Implement a method called printNonComments() which prints out a extract of text with comments removed. For example, the input: hello /* this is a multi line comment */ all Should produce: hello all You have access to a method called getNextLine() which returns the next line in the input string.
Anónimo
//need to use and also "/*" and "*/" need to be followed by space " ". int main() { string s = "hello /* this is a multi line comment */ all "; istringstream iss(s); string tmp; while(iss>>tmp){ if(tmp=="/*"){ while(iss>>tmp){ if(tmp=="*/"){ iss>>tmp; break; } } } cout<