Example1.2: src/iostream/io.cpp (My code without looking the textbook)