
C/C++代码积累
CW_Wei
这个作者很懒,什么都没留下…
展开
-
清除字符串两边空格
// clean the blanks of a stringbool TrimBlank(char *source){ int len = strlen(source); // blanks in the back while ( == source[--len] && len >= 0); if(len { // all are blanks retu原创 2007-10-13 10:42:00 · 938 阅读 · 0 评论 -
CreateToolhelp32Snapshot枚举进程
#include #include #include int main(int argc, char **args){ int count = 0; char shortpath[256]; PROCESSENTRY32 pinfo; MODULEENTRY32 minfo; HANDLE hModule; pinfo.dwSize = sizeof(PROC原创 2007-10-13 10:37:00 · 1297 阅读 · 0 评论