c++ writing to a file
<p>I want to write data to a file in a directory i.e.</p>

<pre><code>path_file = "/Users/aajd/2010M9/2010M9.txt";
std::ofstream outFile(path_file);
</code></pre>

<p>The name of the file and the path to the file is dependent of the outcome of the program.
How can i accomplish this?
Is it necessary that the directory already exists?</p>

<p>Thanks,
André</p>
