• 我的创作纪念日


    机缘

    在学习c++的路上,我注册了一个CSDN账号(为了方便),在CSDN中我学会了很多......


    收获

    提示:在创作的过程中都有哪些收获
    例如:

    1. 获得了27粉丝的关注
    2. 获得了2209个正向的反馈,如赞、评论、阅读量等
    3. 认识的志同道合的领域同行:​​​​​C++小盆友

    O.M.G 欧子正 

    脏脏包 

    Wormwaker

    一只贴代码君

    留在记忆里的一抹残影


    日常

    1. 创作已经是我生活的一部分
    2. 和志同道合的人聊天
    3. 在CSDN上学习

    成就

    你过去写得最好的一段代码是什么? 

    1. #ifndef PRGB_HPP
    2. #define PRGB_HPP
    3. #ifndef PB_HPP
    4. #define PB_HPP
    5. /*头文件*/
    6. #include
    7. #include
    8. #include
    9. #include
    10. /*PD库*/
    11. #define PDAPI
    12. namespace PD{
    13. class{
    14. public:
    15. void what(){
    16. printf("作者:杨某一辰\n介绍:CSDN博客,主页:https://blog.csdn.net/langhat\n");
    17. printf("库名:PD\n开始编写时间:2023-9-23\n版本:1.0.0(非正式)\n版本开始编写时间:2023-9-23\n");
    18. }
    19. }pdl;
    20. }
    21. /*类型*/
    22. typedef bool PBool;
    23. #define PStr std::string
    24. /*API和类*/
    25. namespace PD{}
    26. #endif
    27. #include
    28. #include
    29. //s:淡 b:亮
    30. #define BLACK 0
    31. #define BLUE 1
    32. #define GREEN 2
    33. #define SBULE 3
    34. #define RED 4
    35. #define PURPLE 5
    36. #define YELLO 6
    37. #define WHILE 7
    38. #define ASH 8
    39. #define S_EBULE 9
    40. #define BGREEN 10
    41. #define BBULE 11
    42. #define SRED 12
    43. #define SPURPLE 13
    44. #define BYELLO 14
    45. #define BWHILE 15
    46. //SetRGB
    47. //COLOR Max&Min value
    48. #define MAXCOLOR 256
    49. #define MINCOLOR 0
    50. //Neutral color
    51. #define RGB_WHITE 255,255,255
    52. #define RGB_BLACK 0,0,0
    53. #define RGB_GREY 190,190,190
    54. #define RGB_LGREY 211,211,211
    55. //Color:
    56. #define RGB_RED 256,0,0
    57. #define RGB_YELLOW 255,255,0
    58. #define RGB_BULE 0,0,256
    59. #define RGB_GREEN 0,256,0
    60. //More yellow:
    61. #define RGB_YELLOW2 238,238,0
    62. #define RGB_YELLOW3 205,205,0
    63. #define RGB_YELLOW4 139,139,0
    64. //;
    65. //;
    66. #define GetRGBColorHelp() system("start https:\\tool.oschina.net\commons?type=3")
    67. namespace PD{
    68. int SetRGB(int r,int g,int b){
    69. HANDLE hOut=GetStdHandle(STD_OUTPUT_HANDLE);
    70. if(hOut==INVALID_HANDLE_VALUE)return GetLastError();
    71. DWORD dwMode=0;
    72. if(!GetConsoleMode(hOut,&dwMode))return GetLastError();
    73. dwMode|=0x0004;
    74. if(!SetConsoleMode(hOut,dwMode))return GetLastError();
    75. wprintf(L"\x1b[38;2;%d;%d;%dm",r,g,b);
    76. return 0;
    77. }
    78. void SetColor(int fore,int back){
    79. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),(back<<4)+fore);
    80. }
    81. }
    82. #endif

    注:这是我写的一个库的其中的两个文件(Pb.hpp,PRGB.hpp)

    代码思路:

    用了一些windowsAPI,SetRGB() 是设置颜色(RGB


    憧憬​​​​​​​

    憧憬

    学会Qt,MFC,Windows程序,但看来还要很久......

  • 相关阅读:
    手动部署LNMP环境(Ubuntu 20)
    学习笔记:C++ 11新特性
    C++ 构造函数实战指南:默认构造、带参数构造、拷贝构造与移动构造
    【CSS布局】实现中间自适应,左右宽度固定的三栏布局
    【JavaScript面试】map()方法
    anydesk 远程控制
    CVPR2023 RIFormer, 无需TokenMixer也能达成SOTA性能的极简ViT架构
    机器学习——逻辑回归(LR)
    Spring Boot应用部署 - Tomcat容器替换为Undertow容器
    Android集成FlutterModule
  • 原文地址:https://blog.csdn.net/langhat/article/details/133817211