Problem calling a C++ program from C#
<p>I have a C++ program (Test.exe) that takes in a number <em>N</em> (passed as command line argument) and generates coordinates for <em>N</em> rectangles written to a text file.</p>

<p>I have tested this via the command line and in Visual Studio, and on both occasions the file is written with the expected output.</p>

<p>In a C# program I enter <em>N</em> in a textbox, click a button and my event code is as follows: </p>

<pre><code>Process p = new Process();
p.StartInfo.FileName = "Test.exe";
p.StartInfo.Arguments = num;
p.Start();
// read the file that Test.exe created
</code></pre>

<p>A file is not written by Test.exe.</p>

<p>Any suggestions as to why Test.exe doesn't write the file when it is called from the C# program? </p>

<p><strong>Problem Found</strong> 
The file was being written in the directory where the C# program was executed from NOT from where the C++ program was located.</p>
