Skip to main content

Practice · 1 of 1

Filter error lines from file content

CHALLENGE
Difficulty: intermediate+25 XP

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.

Back to lesson: Practice: File content practice