参考:http://stackoverflow.com/questions/4748956/how-do-i-get-yesterdays-date-in-c
核心代码:
time_t now; struct tm *ts; char yearchar[80]; now = time(NULL); ts = localtime(&now); ts->tm_mday--; mktime(ts); /* Normalise ts */ strftime(yearchar, sizeof(yearchar), "%Y%m%d", ts);
文章的脚注信息由WordPress的wp-posturl插件自动生成

微信扫一扫,打赏作者吧~![[整理][转载]win下网卡抓包发包库Npcap使用](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.jyguagua.com/wp-content/uploads/2023/08/demo_1-1024x711.jpg&w=280&h=210&zc=1)
![[转载]基础数据char,int,double,string是线程安全的吗?](http://www.jyguagua.com/wp-content/themes/begin/img/random/2.jpg)
![[整理]用c++编写的RDTSC性能计时器](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.jyguagua.com/wp-content/uploads/2020/12/rdtsc-assembly-example.jpg&w=280&h=210&zc=1)
![[整理]strcmp汇编写法](http://www.jyguagua.com/wp-content/themes/begin/img/random/20.jpg)