TA的每日心情 | 开心 2017-8-10 09:38 |
|---|
签到天数: 147 天 连续签到: 1 天 [LV.7]常住居民III 初入江湖
 
- UID
- 14705
- 小七币
- 493
- 贡献
- 30
- 在线时间
- 224 小时
- 注册时间
- 2012-10-3
 
|
呼呼 老师注意身体纳!酒别喝太多 伤身体的哦。呼呼
- // sdk13.cpp : Defines the entry point for the application.
- //
- #include "stdafx.h"
- #include "afx.h"
- #include <cstring>
- int APIENTRY WinMain(HINSTANCE hInstance,
- HINSTANCE hPrevInstance,
- LPSTR lpCmdLine,
- int nCmdShow)
- {
- // TODO: Place code here.
- //SDK编程一日一练第13天 早上好小七。
- //xqmsyk.com 全国最大的编程论坛! By:hackbs
-
-
- //FindFirstFile()
- //FindNextFile()
- HANDLE hfile;
- WIN32_FIND_DATA data;
- ZeroMemory(&data, sizeof(data));
- hfile =
- FindFirstFile("C:\\lovexq\\*",&data);
- /*********判断是否查找失败*********************/
- if (hfile == INVALID_HANDLE_VALUE)
- {
- return FALSE;
- }
- /////////////////////////////////////////////
-
- CString path;
- //ZeroMemory(&path,sizeof(path)); //用了这个会报错!
- path="c:\\lovexq\";
- MessageBox(NULL,path,"",MB_OK);
- while( FindNextFile(hfile,&data) != 0)
- {
- MessageBox(NULL,data.cFileName,TEXT("爱你小七!"),MB_OK);
- DeleteFileA(path + data.cFileName);
- }
- return 0;
- }
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|