在菜单栏中依次点击Tools->Editor Options->Snippets->Default Source
勾选Insert the following code into every new empty file
输入自己模板点击OK保存。Date后面可以加<DATETIME>显示日期
/* Name: Copyright: Author: Date: <DATETIME> Description: */ #include<iostream> using namespace std; int main() { freopen("in","r",stdin); return 0; }