Non-Profit, International

Spirit unsterblich.

  • Windows 控制台代码页

    字数统计:911
    一年多以前我写了个博文理解C和C++程序的编码介绍了C和C++中字符串编码的情况,但对Windows控制台的解释还不够好。本文是对这部分内容的补全。
  • 使用代码监听和更改 Windows11 主题色

    字数统计:236
    Windows11 添加了对亮暗主题色的支持,但并没有任何公开文档说明如何查询和监听主题色。但实际上微软半公开的提供了API。
  • 协程的协作取消

    字数统计:1748
    C++20的协程在大多数方面提供了非常高的灵活性,但唯有一点却相对死板,即协程的退出路径。协程只有异常和返回值两个路径可以打断协程执行,可能大部分人意识不到这有什么问题,但我认为这实际上缺了重要一环:协作取消。
  • 深入C++模块

    字数统计:4709
    之前的文章C++ 模块介绍了模块的基本概念和语法,但仍然缺乏系统性的指导。该文章总结了我过去使用模块的经验,对于大部分人来说应该足够了。
  • Modules In Depth

    字数统计:2855
    The previous article C++ Modules introduced the basic concepts and syntax of modules, but still lacked systematic guidance. This article summarizes my experience using modules over the past years and should be sufficient for most people.
  • 停止使用 AttachConsole

    字数统计:662
    Windows XP开始提供了一个函数 AttachConsole,它的用途是使得Subsystem为Windows的GUI/后台程序,在使用控制台执行时可以获得控制台的输入输出句柄,使得它们既可以独立使用也可以和控制台配合使用。但该函数实际上存在缺陷使得它不能很好完成该任务。
  • C++ Modules

    字数统计:1541
    An important feature of C++20 is modules, a completely new way of organising source files. It aims to solve the problems of overly large translation units and repeated template instantiations caused by the traditional source‑file inclusion model, thereby speeding up compilation.