#include <iostream>
int main() {
zstring filename = execdir() + "/../data/in1.txt";
("Printing all lines in "_zs + filename).writeln(std::cout);
for (auto line : lines(filename)) {
line.writeln(std::cout);
}
}
zpath execdir() noexcept
Get the directory path of the running executable.
Definition execdir.hpp:11
core::generator< zstring, fileHandle > lines(const zpath &filename)
Reads the contents of a file line-by-line.