Color Console module: Use a colorful console terminal on the Windows command Line (console)

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.