随笔分类 -  实用工具性代码

摘要:1 #include 2 #include 3 4 5 //判断是否闰年 6 bool IsLeapYear(unsigned int year) 7 { 8 if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) 9 { 10 return true; 11 } 12 else 13... 阅读全文
posted @ 2016-12-07 18:00 甩锅侠 阅读(2313) 评论(0) 推荐(0)
摘要:1、将单字节Char转化为双字节的wchar_t的转换函数 wchar_t* c2w(const char *str){ int length = strlen(str)+1; wchar_t *t = (wchar_t*)malloc(sizeof(wchar_t)*length); memset 阅读全文
posted @ 2016-10-19 16:20 甩锅侠 阅读(262) 评论(0) 推荐(0)