- 博客(4)
- 收藏
- 关注

原创 linux下面递归创建目录结构
void mkdirs(const char *dir) { std::string strPath; if (strlen(dir) == 0 || dir == nullptr) { printf("strlen(dir) is 0 or dir is NULL./n"); return; } strPath = dir; size_t nPos = 0, n
2014-07-28 17:16:44
3158
原创 对std::thread的封装使用
创建CThread类,封装自std::thread. #ifndef THREAD_H_ #define THREAD_H_ #include #include #include #include class CThread { public: CThread() : _bRun(false){} CThread(CThread& src): _bRun(src._bRun),
2014-07-28 17:53:47
1785
原创 linux下获得进程的名称和路径
//获得进程lu'jing std::string get_exec_path() { char szlink[1024], szpath[1024]; sprintf(szlink, "/proc/%d/exe", getpid()); int32_t rslt = readlink(szlink, szpath, sizeof(szpath)); if (rslt sz
2014-07-28 17:22:50
538
原创 两个手机号合并生成64位整数
将手机号的前三位做 bool MakePhoneID(uint64_t qwID1, uint64_t qwID2, uint64_t& qwMergeID) { qwMergeID = 0; if(qwID1 > qwID2) swap(qwID1, qwID2); uint64_t qwLow1 = qwID1%100000000; uint64_t qwLow2 = q
2014-07-28 16:55:08
595
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人