A lightweight, standalone utility built entirely in C++ with zero external dependencies — only requiring a C++ compiler to build and run. No third-party libraries, just pure C++ code. Made for simplicity and portability, the project relies solely on the C++ standard library without any additional frameworks or libraries.
-
Operating System: The program is designed to run on Windows, Linux, or macOS, as long as the system supports C++17 or later.
-
C++ Compiler: A C++17-compatible compiler such as GCC, Clang, or MSVC is required to compile and run the code.
-
UTF-8 & ANSI Codes Support: These two requirements are necessary for the proper display of graphical bars (like █, ▓, ▒, or ▀) and colored text in the console.
Note: Some older CMD versions do not fully support ANSI colors without a third-party emulator like ConEmu or Cmder.
By default, Windows CMD uses Code Page 437, which does not support special characters like Unicode symbols. To enable UTF-8:
Run this command inside CMD before executing your program.
chcp 65001
- Open Run (Win + R), type regedit, and press Enter.
- Navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage
- Find OEMCP, double-click it, and change its value to:
65001
- Restart your computer.
- Open Settings → Time & Language → Language & Region.
- Scroll down and click Administrative language settings.
- In the new window, go to Change system locale.
- Check Beta: Use Unicode UTF-8 for worldwide language support.
- Restart your computer.
Run this command in CMD:
reg add HKEY_CURRENT_USER\Console /v VirtualTerminalLevel /t REG_DWORD /d 1 /f
- This enables ANSI escape sequences in CMD.
- Restart CMD after executing this command.
After enabling ANSI support, you can use ANSI escape sequences in your C++ program:
std::cout << "\033[38;5;124m Red Text \033[0m\n"; // Foreground color (Red)
std::cout << "\033[48;5;46m Green Background \033[0m\n"; // Background color (Green)
After setting up:
- Check UTF-8:
chcp- If it returns 65001, UTF-8 is enabled.
- Check ANSI Colors:
Try running this C++ snippet:
If you see colored text, ANSI colors are working.
#include <iostream> int main() { std::cout << "\033[38;5;124mRed Text\033[0m" << std::endl; std::cout << "\033[48;5;46mGreen Background\033[0m" << std::endl; return 0; }
- Windows Terminal (from Microsoft Store) has built-in UTF-8 and ANSI support.
- Always test your settings with chcp and ANSI color codes before running your program.