I want to make some printf’s to the windows console from my C program but want to make some of them different colours.
Anyone know if this can be done easily?
EDIT: Windows XP is my OS
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.
SetConsoleTextAttribute()will let you set the color of subsequent text output.You’ll probably want to look at the complete set of Win32 console APIs to be able to get/set/restore and otherwise manipulate the console.