Colorizing text in the console with C++

后端 未结 12 2582
礼貌的吻别
礼貌的吻别 2020-11-27 10:04

How can I write colored text to the console with C++? That is, how can I write different text with different colors?

12条回答
  •  旧巷少年郎
    2020-11-27 10:52

    I'm not sure what you really want to do, but my guess is you want your C++ program to output colored text in the console, right ? Don't know about Windows, but on all Unices (including Mac OS X), you'd simply use ANSI escape sequences for that.

提交回复
热议问题