高效的代码往往都具备好的注释
突发奇想: 当 IDE 没有相符的快捷代码片段时, 不妨自己写一个
// 命令行实现文件及函数头部注释:
#include <stdio.h>
#include <time.h>
int main()
{
printf("/****************************************************************\n");
printf("*文件范围: 本文用于...\n*设计说明: NA\n*注意事项: NA\n*作 者: 佚名\n*创建日期: ");
time_t curTime = time(NULL);
struct tm* localTime = localtime(&curTime);
char s[50];
char* format = "%Y-%m-%d %H:%M:%S";
size_t max_size = 49;
size_t result = strftime(s, max_size,format,localTime);
if (result != 0)
printf(s);
printf("\n****************************************************************/\n\n\n");
printf("/****************************************************************\n");
printf("*功能描述:\n*输入参数: NA\n*输出参数: NA\n*返回参数: NA\n*作 者: 佚名\n*创建日期: ");
printf(s);
printf("\n****************************************************************/\n");
getchar();
return 0;
}