I'm inexperienced with C++, and am wondering how to change the color of the text. I am using MS Visual C++ and the output is simple and DOS-like. Unless specified, the color of the text is white, though I'm trying to change it to red. I have searched for hours on-line to no avail. I have found textcolor(), settextcolor, etc., but have not found how to use them in a simple program that does not involve graphics or windows (as opposed to DOS-like). Thanks for any help.
This has been answered, try using a board search.
HANDLE hOutput = GetStdHandle(STD_OUTPUT_HANDLE);
cout << "This would be red";
SetConsoleTextAttribute(hOutput, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
cout << "This would be white again";