Setting individual text colors in c++
<p>I'm a beginner in C++ programming and I want to know how to set a text color for individual texts. I know how to set text colors using <code>system("COLOR ..")</code> but it applies color to ALL texts, not individual texts. There's a program I've been coding wherein when the text is "Yes" that "Yes" will be color green and when it is "No", that "No" will be color red. This is for console application.</p>

<pre><code>cout&lt;&lt;"Available: ";
if(available == true){
//code for setting text colors to GREEN
}
else{
//code for setting text colors to RED
}
cout&lt;&lt;yesno;
//code for setting text colors back to WHITE
</code></pre>

<p>so the output will be like for example</p>

<blockquote>
  <p>Available: (textcolor="green")Yes(/textcolor)</p>
</blockquote>

<p>Thank you for any help!</p>