69,371
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
#define array_each(arr, type, pos, val, code) {\
type *_arr = (arr);\
unsigned int i, _len = sizeof(arr) / sizeof(type);\
type val;\
for (pos = 0; pos < _len; pos++) {\
val = _arr[pos];\
code;\
}\
}
int main (char argc, char **argv)
{
int arrt[] = {1, 3, 5, 6, 90, 32, 64};
array_each(arrt, int, i, v,
printf("%d: %s\n", i, v);
);
}
#define PROCESSFILENAME() \
WPATH desPath = {0}; \
wcscat(desPath, foi->destFolder); \
unsigned int len = wcslen(foi->srcList[i]); \
while(foi->srcList[i][--len] != L'\\' && len >= 0); \
wcscat(desPath, foi->srcList[i] + len); \
DWORD attrb = GetFileAttributesW(desPath); \
if(INVALID_FILE_ATTRIBUTES == attrb) \
{ \
continue; \
} \