我使用“system”命令更改了控制台中的背景和文本颜色。
#include <iostream> using namespace std; int main() { system ("color 1a"); cout <<"Hello World"; cin.ignore(); return 0; }
有没有办法只在一行中改变颜色?C 或 C++ 都很好。谢谢。
c c++
c ×1
c++ ×1