char buff[MAXLINE];
time_t ticks;
ticks = time(NULL);
snprintf(buff, sizeof(buff), "%.24s\r\n", ctime(&ticks)); // with .
我尝试了以下行,没有发现任何区别:
snprintf(buff, sizeof(buff), "%24s\r\n", ctime(&ticks)); // without .
我在这里错过了一些关键点吗?
谢谢
char buff[MAXLINE];
time_t ticks;
ticks = time(NULL);
snprintf(buff, sizeof(buff), "%.24s\r\n", ctime(&ticks)); // with .
我尝试了以下行,没有发现任何区别:
snprintf(buff, sizeof(buff), "%24s\r\n", ctime(&ticks)); // without .
我在这里错过了一些关键点吗?
谢谢