新闻中心

EEPW首页>嵌入式系统>设计应用> 51中如果用sprintf()函数一定要多注意!

51中如果用sprintf()函数一定要多注意!

作者: 时间:2016-11-10 来源:网络 收藏
sprintf( (char *)d,"打印日期:%d-%02d-%02d %02d:%02d:%02d",
(int)SystemTime.year,
(int)SystemTime.month,
(int)SystemTime.day,
(int)SystemTime.hour,
(int)SystemTime.minute,
(int)SystemTime.second
);

如果不加强制转换,打印输出异常。51一定要注意,耽误了我一个上午的时间!!

本文引用地址: //m.amcfsurvey.com/article/201611/317302.htm



关键词:51sprintf()函

评论


技术专区

关闭