CppCommon  1.0.4.1
C++ Common Library
system_console.cpp

Console management example

#include "system/console.h"
#include <iostream>
#include <iomanip>
int main(int argc, char** argv)
{
for (int i = (int)CppCommon::Color::BLACK; i <= (int)CppCommon::Color::WHITE; ++i)
{
for (int j = (int)CppCommon::Color::BLACK; j <= (int)CppCommon::Color::WHITE; ++j)
{
std::cout << std::make_pair((CppCommon::Color)i, (CppCommon::Color)j);
std::cout << " ";
std::cout << std::setfill('0') << std::setw(2) << i;
std::cout << " / ";
std::cout << std::setfill('0') << std::setw(2) << j;
std::cout << " ";
}
std::cout << std::endl;
}
return 0;
}
static void SetColor(Color color, Color background=Color::BLACK)
Set console text color.
Definition: console.cpp:19
Console management definition.
Color
Supported console colors.
Definition: console.h:18
@ BLACK
Black color.
@ WHITE
White color.