Why do I get "illegal use of pointer" when constructing a command line for system()?
<p>I wrote this code, hoping to change the color of the console window:</p>

<pre><code>char r[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
while(true) {
  cout &lt;&lt;"ololol";
  system("color "&lt;&lt;r[rand()%15]&lt;&lt;r[rand()%15]);
}
</code></pre>

<p>I get this error message from the compiler:</p>

<blockquote>
  <p>Error E2087 seizure.cpp 11: Illegal use of pointer in function main()</p>
</blockquote>

<p>What's wrong with my code?</p>
