1 2 3 4 5 6 7 8 9 10
#include <iostream> #include "stdin_to_file.hh" int main() { auto word_count = stdin_to_file("file.out"); std::cout << "File has " << word_count << " words\n"; return 0; }