Equivalent of #region for C++

前端 未结 10 1211
無奈伤痛
無奈伤痛 2020-12-24 04:17

What\'s the C++ equivalent of #region for C++ so I can put in custom code collapsible bits and make my code a little easier to read?

10条回答
  •  佛祖请我去吃肉
    2020-12-24 05:11

    In addition to #pragma region#pragma endregion for Visual Studio, many IDEs support the following syntax for regions in any {}-delimited, //-commented language:

    //{ Region header text.
    …
    //}
    

    Notable examples include Code::Blocks and FlashDevelop, and any other editor that uses the Scintilla editing component, such as Notepad++, Geany, Komodo Edit, and many more.

提交回复
热议问题