
C/C++
棌棌棌棌棌厷
github求互粉 https://github.com/wilhantian
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
cocos2d-x获取系统日期或时间
cocos2d-x 3.x后原本CCTime被弃用,所以,只能使用C库中的获取系统日期和时间struct timeval nowTimeval;gettimeofday(&nowTimeval, NULL);struct tm * tm;time_t time_sec ;time_sec = nowTimeval.tv_sec;tm = localtime(&time_sec原创 2015-06-18 15:29:45 · 858 阅读 · 0 评论 -
std::string字符串分割
废话不多说,直接上代码:std::vector split(std::string str, std::string pat){ std::vector bufStr; while (true) { int index = str.find(pat); std::string subStr = str.substr(0, index); if (!subStr.empty(原创 2015-06-18 10:09:53 · 3031 阅读 · 0 评论