Recently wrote a network module, with the command line Windows comes out debugging information, debugging information a bit more, monochrome slightly monotonous, so took a little time to do the following small modules.
The code is very small, the use of the method is extremely simple , I will not repeat, the following examples. Less time, less talk.
Have any bug, or have any need to improve, remember to contact me at any time ~ ~
Palette
Example code:
1#include <iostream>2 3#include"color_term.h"4 5 intMain ()6 {7 color_term::color_term cterm;8 9Cterm.title ("color-terminal (by Twofei, http://twofei.com)");Ten OneStd::cout << Cterm (8+7,8+4) A<<"---------------------" -<<"Twofei ' s color-terminal" -<<"--------------------" the<<"\ n"<<Std::endl; - -Std::cout << Cterm (8+2,-1) -<<"\ Blog:http://www.cnblogs.com/memset" +<<Std::endl; - +Std::cout << Cterm (8+1+4, -1) A<<"\t\t Author:twofei <[email protected]>" at<<Std::endl; - -Std::cout << Cterm (8+6, -1) -<<"\t\t Date:sun, 9 Nov" -<<Std::endl; - instd::cout<< Cterm (-1,-1) <<Std::endl; - to for(intFG =0; FG < -; fg++){ + for(intBG =0; BG < -; bg++){ -Std::cout <<cterm (FG,BG) the<<'('<<Char(fg>=Ten? fg-Ten+'A': fg+'0') *<<Char(bg>=Ten? bg-Ten+'A': bg+'0') <<')'; $ }Panax NotoginsengStd::cout <<Std::endl; - } the + Cterm.restore (); A the return 0; +}
Source code Project and Example (VC6.0): http://alioss.twofei.com/windows/colorterminal.7z
Girl doesn't cry @ cnblogs.com/memset @ 2014.11.09
Color Console module: Use a colorful console terminal on the Windows command Line (console)