title: how to convert C# to C++
body: <p>Could someone please help me to convert C#  to C++? here is an example:</p>
  
  <pre><code>using System;
  using System.Net;
  using System.Text;
  using System.IO;
  using System.Threading;
  namespace read_website
  {
      class Program
      {
          static void Main(string[] args)
          {
              while (true)
              {
                  DownloadString("http://www.xxx.asp");
                  Thread.Sleep(100);//update every 100 millisecoand 
              }
          }
  
          public static void DownloadString(string address)
          {           
              WebClient client = new WebClient();
              string website = client.DownloadString(address);
              get_Current_X1_value(website);
          }
  
          static void get_Current_X1_value(string web)
          {
              int x = web.IndexOf("Current X1 value:");
              string part1 = web.Substring(x, 100);
              string[] array = part1.Split('&gt;', '&lt;');
              for (int i = 0; i &lt; array.Length; i++)
              {
                  if (array[i].Contains("Current X1 value:"))
                      Console.Write(array[i]);
                  if (array[i].Contains("W"))
                      Console.WriteLine(array[i]);
              }
  
          }
      }
  }
  </code></pre>
  
  <p>Actually as it is complicated to mix C# and C++ on unix, I am trying to convert C# to C++</p>