All pastes #1582647 Raw Edit

何か

public cpp v1 · immutable
#1582647 ·published 2009-09-28 15:16 UTC
rendered paste body
void findFile(std::vector<std::string>& fileList, const std::string& path){	HANDLE hSearch;	WIN32_FIND_DATA findData;	std::string findPath;	std::string fileName;	hSearch = FindFirstFile((path + "\\*").c_str(), &findData);	if (hSearch == INVALID_HANDLE_VALUE) {		std::cerr << "ファイルの検索に失敗しました" << std::endl;		return;	}	do {		fileName = std::string(findData.cFileName);		if (fileName != "." && fileName != "..") {			if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {				findFile(fileList, path + "\\" + fileName);			}else{				fileList.push_back(path + "\\" + fileName);			}		}	} while (FindNextFile(hSearch, &findData));	FindClose(hSearch);}