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 system("COLOR ..")
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.
cout<<"Available: ";
if(available == true){
//code for setting text colors to GREEN
}
else{
//code for setting text colors to RED
}
cout<<yesno;
//code for setting text colors back to WHITE
so the output will be like for example
Available: (textcolor="green")Yes(/textcolor)
Thank you for any help!