<tfoot id='5BqVR'></tfoot>

    <small id='5BqVR'></small><noframes id='5BqVR'>

    1. <i id='5BqVR'><tr id='5BqVR'><dt id='5BqVR'><q id='5BqVR'><span id='5BqVR'><b id='5BqVR'><form id='5BqVR'><ins id='5BqVR'></ins><ul id='5BqVR'></ul><sub id='5BqVR'></sub></form><legend id='5BqVR'></legend><bdo id='5BqVR'><pre id='5BqVR'><center id='5BqVR'></center></pre></bdo></b><th id='5BqVR'></th></span></q></dt></tr></i><div id='5BqVR'><tfoot id='5BqVR'></tfoot><dl id='5BqVR'><fieldset id='5BqVR'></fieldset></dl></div>
      <legend id='5BqVR'><style id='5BqVR'><dir id='5BqVR'><q id='5BqVR'></q></dir></style></legend>

          <bdo id='5BqVR'></bdo><ul id='5BqVR'></ul>

        便携式基于文本的控制台操纵器

        Portable text based console manipulator(便携式基于文本的控制台操纵器)
          <tfoot id='dXIEL'></tfoot>

          <legend id='dXIEL'><style id='dXIEL'><dir id='dXIEL'><q id='dXIEL'></q></dir></style></legend>

          1. <i id='dXIEL'><tr id='dXIEL'><dt id='dXIEL'><q id='dXIEL'><span id='dXIEL'><b id='dXIEL'><form id='dXIEL'><ins id='dXIEL'></ins><ul id='dXIEL'></ul><sub id='dXIEL'></sub></form><legend id='dXIEL'></legend><bdo id='dXIEL'><pre id='dXIEL'><center id='dXIEL'></center></pre></bdo></b><th id='dXIEL'></th></span></q></dt></tr></i><div id='dXIEL'><tfoot id='dXIEL'></tfoot><dl id='dXIEL'><fieldset id='dXIEL'></fieldset></dl></div>
              • <bdo id='dXIEL'></bdo><ul id='dXIEL'></ul>
                  <tbody id='dXIEL'></tbody>

                  <small id='dXIEL'></small><noframes id='dXIEL'>

                  本文介绍了便携式基于文本的控制台操纵器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  应用程序可以操作基于文本的控制台或终端,并更改它们的颜色、设置光标位置.支持的方法是:

                  Applications can manipulate text based consoles or terminals, and change their colors, set cursor position. The supported approaches are:

                  • 对于类 Unix 系统:ANSI 转义码.
                  • 对于 Windows 系统:有像 SetConsoleTextAttribute.
                  • ...

                  但是,是否有任何轻量级和可移植的 C/C++ 库可以处理操作系统之间的差异,仅针对颜色和光标?并且如果技术上不可能但尽最大努力什么都不做.

                  but, is there any lightweight and portable C/C++ library which handles differences between operating systems just for colors and cursor? and do nothing if it was technically impossible but best effort.

                  注意:我不是在寻找大量的外部工具来模拟类 Unix 终端(如 Cygwin、Msys-rxvt 等).我认为使用 Windows API 和 ANSI 转义码可以实现简单的可移植性. 而不是 ncurses,因为它很重,并且有很多功能可以完全控制控制台,我认为它需要模拟.>

                  推荐答案

                  好吧,我终于找到了一个可移植且易于使用的库:rlutil.h

                  Alright, i finally found a portable and easy to use library: rlutil.h

                  用法:

                  #include <iostream>
                  #include "rlutil.h"
                  int main()
                  {
                      for (int i = 0; i < 16; i++)
                      {
                          rlutil::setColor(i);
                          std::cout << i << " ";
                      }
                      std::cout << std::endl;
                      return 0;
                  }
                  

                  但是,我很乐意提供其他建议.

                  这篇关于便携式基于文本的控制台操纵器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What is inside .lib file of Static library, Statically linked dynamic library and dynamically linked dynamic library?(静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么?)
                  How do I load a C DLL from the SXS in Python?(如何从 Python 中的 SXS 加载 C DLL?)
                  Can Cython code be compiled to a dll so C++ application can call it?(Cython 代码可以编译成 dll 以便 C++ 应用程序可以调用它吗?)
                  Delay Loading DLLs(延迟加载 DLL)
                  Throwing C++ exceptions across DLL boundaries(跨 DLL 边界抛出 C++ 异常)
                  Loading a dll from a dll?(从 dll 加载 dll?)
                      <bdo id='fEwE6'></bdo><ul id='fEwE6'></ul>

                    • <legend id='fEwE6'><style id='fEwE6'><dir id='fEwE6'><q id='fEwE6'></q></dir></style></legend>

                      <small id='fEwE6'></small><noframes id='fEwE6'>

                    • <tfoot id='fEwE6'></tfoot>

                          <tbody id='fEwE6'></tbody>
                          <i id='fEwE6'><tr id='fEwE6'><dt id='fEwE6'><q id='fEwE6'><span id='fEwE6'><b id='fEwE6'><form id='fEwE6'><ins id='fEwE6'></ins><ul id='fEwE6'></ul><sub id='fEwE6'></sub></form><legend id='fEwE6'></legend><bdo id='fEwE6'><pre id='fEwE6'><center id='fEwE6'></center></pre></bdo></b><th id='fEwE6'></th></span></q></dt></tr></i><div id='fEwE6'><tfoot id='fEwE6'></tfoot><dl id='fEwE6'><fieldset id='fEwE6'></fieldset></dl></div>