문제

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!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top