1 2 3 4 5 6 7 8
int main() { std::ofstream ofs("output_file.txt"); // ... for (/* ... */) { ofs << it->str() << std::endl; } // ... }