0

私は VC++ 開発者ではありませんが、ソース コードを編集するために検索しています。コンソールに別の色 (緑、赤など) の新しい行を追加するだけです。

void main()
{
    static char * DES_KEY = "!_a^Rc*|#][Ych$~'(M _!d4aUo^%${T!~}h*&X%";

    XStrDESUtil desUtil(DES_KEY);

    printf("Password: %s\n", desUtil.Decrypt("1a6a2dfd3e44b8a0b02a2b66c801821e").c_str());

    system("PAUSE");
}

私は検索しましたが、私が見つけたのはすべてです

  printf ("\033[34;01mBonjour\033[00m\n");

そしてそれらの文字...しかし、いくつかの理由で機能しません:(

4

2 に答える 2

1

In Windows, you can use the Windows Console Functions for this, such as SetConsoleTextAttribute.

I have created a small free C++ template library (one header only) to wrap many of that functionality. Available at http://cppconlib.codeplex.com/.

enter image description here

于 2013-09-27T07:34:33.923 に答える