Pergunta

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

Foi útil?

Solução

Oh, silly me ! Installpath was 1 folder deeper and had nothing in it ! Sorry for the inconvenience!

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top