How to properly declare/use a character with a particular ASCII code in out.write?
<p>I have the following buffer</p>

<pre><code>std::vector&lt;char&gt; vecBuffer;
</code></pre>

<p>the following delimiter</p>

<pre><code>char delim = char(167);
</code></pre>

<p>The following replace function</p>

<pre><code>std::replace(vecBuffer.begin(), vecBuffer.end(), delim, ' ');
</code></pre>

<p>And the following output routines</p>

<pre><code>out.write(&amp;vecBuffer[0], x.length());
out.write(delim, 1);
</code></pre>

<p>However the last line gives me the error </p>

<pre><code>error: invalid conversion from 'char' to 'const char*' [-fpermissive]
</code></pre>
