Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ ANSI控制码无法改变字体颜色 #22

Open
ZhDuoYu opened this issue Nov 17, 2021 · 1 comment
Open

C++ ANSI控制码无法改变字体颜色 #22

ZhDuoYu opened this issue Nov 17, 2021 · 1 comment

Comments

@ZhDuoYu
Copy link

ZhDuoYu commented Nov 17, 2021

windows下VS2017
代码:
int main()
{
cout << "\033[" << 34 << "m"<<" test....";
system("pause");
return 0;
}
输出:
�[34m test....请按任意键继续. . .

应该输出蓝色字体的 test.... 才对

@ZhDuoYu
Copy link
Author

ZhDuoYu commented Nov 17, 2021

在另一台电脑上Windows-VS2019下输出的是正确的蓝色字体,我自己的电脑上不行。请问应该如何进行设置呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant