// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>
#include <cstring>

using namespace std;

#include <windows.h>

int main()
{
   char buf[1000];
   if (GetLogicalDriveStrings(sizeof(buf),buf)) 
   {
      char *p = buf;
      while(strlen(p)>0)
      {
          cout << p << endl;
          p += (strlen(p) + 1);
      }
   }
   return 0;
}
