폴더의 반복
                                            
 5341 단어  폴더
                    
자기가 먼저 목적을 달성할 수 있는 걸 쓰려고 해요.
 1 #include <stdio.h>
 2 #include <windows.h>
 3 #include <stack>
 4 #include <string>
 5 
 6 
 7 using namespace std;
 8 
 9
10 int main(int argc, char * argv[])
11 {
12     string strCuurPath = "e:\\program Files\\11\\";
13     stack<string> vectStr;
14     vectStr.push(strCuurPath);
15 
16     WIN32_FIND_DATA findData;
17     HANDLE hFindFile;
18    
19    while(!vectStr.empty())
20    {
21         strCuurPath = vectStr.top();
22         vectStr.pop();
23         string strNeedFind = strCuurPath +"*.*";
24         hFindFile = FindFirstFile(strNeedFind.c_str(), &findData);
25         if( hFindFile != INVALID_HANDLE_VALUE)
26         {
27              do
28              {
29                   if(findData.cFileName[0] == '.') continue;
30                   if(findData.dwFileAttributes &FILE_ATTRIBUTE_DIRECTORY)
31                   {
32                          strNeedFind = strCuurPath +  findData.cFileName + "\\";
33                          vectStr.push(strNeedFind);
34                          printf("%s 
",  strNeedFind.c_str());
35                   }
36              }while(FindNextFile(hFindFile, &findData));
37          FindClose(hFindFile);
38         }
39     
40    }
41 
42   return 0;
43 }이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Cognos에서 새로 만든 그룹에 폴더 찾아보기 권한을 부여해도 폴더가 표시되지 않음Cognos BI에서 한 사용자(예: coguser2)를 새로 만든 역할(예: Role01)에만 속하고 공유 폴더의 특정 폴더(예에서는 TestFolder)에 다음과 같이 액세스 권한 부여 , 이것으로 보일 것 같아...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.