Example1.9: src/stdstreams/streamdemo.cpp