How to pass user input color into textcolor()?
<p>How do I pass a user input color to the <code>textcolor()</code> function in <code>conio.h</code> ?</p>

<pre><code>textcolor(BLUE);
cprintf("Hello");
</code></pre>

<p>works fine, but</p>

<pre><code>char c[20];
gets(c);
textcolor(c);
cprintf("Hello");
</code></pre>

<p>throws an error. I didn't expect it to work myself. So the question is, how can a user enter a color for text to be displayed?
Due to some stupid constrains, I have to do this on the old turbo c++ and cannot use <code>graphics.h</code> , <code>dos.h</code> etc. So a solution that uses <code>textcolor()</code> itself would be great.</p>