C 和 C++ 代码模板缩写:快速参考

另请参见

键入 C 和 C++ 代码时,您可以键入缩写以通过模板来生成代码,从而减少击键的次数。键入空格后,缩写将展开为模板中相应的展开文本。

IDE 提供了一组 C 和 C++ 代码模板。您也可以创建自己的代码模板。

下面是 IDE 缺省提供的 C 和 C++ 代码模板列表。

缩写 代码模板
FA FALSE
TR TRUE
bo bool
ca case
cl class
co const
de default
def #define
do double
eif #endif
en enum
ex exception
fa false
fl float
fori for (int i = 0; i < |; i++) {}
forj for (int j = 0; j < |; i++) {}
ifd #ifdef
ife if (|) {} else {}
iff if (|) {}
ifn #ifndef
inc #include <ostream>
lo long
pra #pragma
sh short
stu struct
sw switch
tr true
ty typedef
uni union
uns unsigned
wc wchar
ws wstring
另请参见
使用缩写
创建和定制代码模板

法律声明