nd namespace boost::iostreams:example</SPAN></PRE>

<P>Let's look first at the helper function <CODE>put_char</CODE>:</P>

<PRE class="broken_ie">    <SPAN CLASS="keyword">template</SPAN>&lt;<SPAN CLASS="keyword">typename</SPAN> Sink&gt;
    <SPAN CLASS="keyword"><SPAN CLASS="keyword">bool</SPAN></SPAN> put_char(Sink&amp; dest, <SPAN CLASS="keyword"><SPAN CLASS="keyword">int</SPAN></SPAN> c)
    {
        <SPAN CLASS="keyword">if</SPAN> (!iostreams::put(dest, c))
            <SPAN CLASS="keyword">return</SP