Is there anyway to do this? im currently using and the functions system(Color ); but that changes the font and background color of the whole program, how can i change specific parts only?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use VT100 escape codes to add colour to your text output. Then you don’t need any external library or program.
Example:
Edit: Escape codes do not work in the Windows command prompt, instead you have to use functions such as
SetConsoleTextAttribute.Here is an example showing how to use it: