Skip to main content

Practice ยท 1 of 1

Filter error lines from file content

Implement std::string error_lines(const std::string& content) that treats content as a text file (lines separated by \n) and returns only the lines starting with ERROR , each followed by \n. Use std::istringstream + std::getline.

Difficulty: intermediate

Back to lesson: Practice: File content practice