title: How to scan all files in a folder, including subfolders in VC++ 2008?
body: <p>I'm want to build an application in VC++ 2008 (Windows form application).</p>
  
  <p>Here I want to browse a folder of my choice (push button "browse"), such that when I press the "scan" button my application will find all the files in the folder I chose, including subfolders. Then all files are placed in a listbox,  I have this code will be in c# not in c++, how to change my code in c++?</p>
  
  <pre><code>private void btnScan_Click_1(object sender, EventArgs e)
      {
  
          List&lt;string&gt; search = Directory.GetFiles(folderBrowserDialog1.SelectedPath, "*.*", SearchOption.AllDirectories).ToList();
          progressBar1.Maximum = search.Count;
          //foreach (Directory.GetDirectories.search))
  
          foreach(string item in search)
          {
              try
               {
                  StreamReader stream = new StreamReader(item);
                  string read = stream.ReadToEnd();
                  foreach(string st in viruslist)
                  {
                  if(Regex.IsMatch(read,st))
                  {
                  viruses+=1;
                      label1.Text+= viruses;
                      listBox1.Items.Add(item);
                  }
                  progressBar1.Increment(1);
                  }
  
               }
               catch(Exception ex)
               {
  
               }
          }
      }
  </code></pre>