📄 sam19_1.c
字号:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "sam19_1.h"
string mytoday(char date[])
{
time_t Today;
string TodayString;
Today = time( NULL );
TodayString = ctime(&Today);
strncpy( date,TodayString,10);
strncpy( &date[10],&TodayString[19],5 );
date[15] = '\0';
return date;
}
string myclock( char hour[] )
{
time_t Time;
string Timestring;
Time = time( NULL );
Timestring = ctime( &Time );
strncpy( hour,&Timestring[11],8 );
hour[8] = '\0';
return hour;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -