在C++中,以下代码在控制台中运行时将以彩色打印文本:
cout << "\e[32;40mGreenForegroundAndBlackBackgroundText" << endl;
Run Code Online (Sandbox Code Playgroud)
在DI中出错:
string s = "\e[32;40mGreenForegroundAndBlackBackgroundText"; // undefined escape sequence \e
Run Code Online (Sandbox Code Playgroud)
有没有办法让这个在D工作?
| 归档时间: |
|
| 查看次数: |
132 次 |
| 最近记录: |