title: Communications between Visual C++ and Arduino:
body: <p>I have a Arduino app that needs to talk to my PC across the USB (Serial) connection.  I have this bit of code that I lifted from the Arduino Playground at </p>
  
  <p><a href="http://arduino.cc/playground/Interfacing/CPPWindows#VisualStudio2008" rel="nofollow">http://arduino.cc/playground/Interfacing/CPPWindows#VisualStudio2008</a></p>
  
  <pre><code>  this-&gt;serialPort1-&gt;PortName = "COM5";  // Replace with your COM port!
    this-&gt;serialPort1-&gt;Open();
    this-&gt;serialPort1-&gt;Write( "7" );  // In the future,  you'll expand on this
                                      // to write your custom data to the board
    this-&gt;serialPort1-&gt;Close();
  </code></pre>
  
  <p>My question is how does one determine what COM port the Arduino USB cable is attached to?</p>