Firstly, this is not "how to change text color in C++" but "how to change text color in windows console".
Secondly, could it be that you simply didn't declare a dosHandleOut? OP in that thread wrote a good snippet of code (if you replace the # with an appropriate constant).
You may shorten the code to SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 0x0A);. This should be light green, if I remember correctly.
And you can't change text size, I think.
ok thanks i got the idea. But i still cant understand how to change the text color of a text. Did u mean we can't change the text color in windows 32 console apps?
BTW thank you so much for your reply.