GetDirectories in C++.net/C++ CLI
-
30-06-2021 - |
题
Following the example provided by microsoft for Directory::GetDirectory I came to this piece of code:
auto k = System::IO::Directory::GetDirectories(installpath);
auto dir = k->GetEnumerator();
while (dir->MoveNext())
{
String^ subdirectory = safe_cast<String^>(dir->Current);
MessageBox::Show(subdirectory);
}
which should list all directories in installpath, right? Well it doesn't appear to work! (no messagebox) How do I fix this?
note: installpath exists and has subdirectories
解决方案
Oh, silly me ! Installpath was 1 folder deeper and had nothing in it ! Sorry for the inconvenience!
不隶属于 StackOverflow