using > instead of stdout
<p>So for my program I need to take all the informations that are shown in cmd.exe and put them on a file.
So for that I used the following code</p>

<pre><code>freopen ("text.txt","w",stdout);
</code></pre>

<p>and I had to put it in the main.cpp</p>

<p>However I was told that I should do that in a diffrent class and that I could use the <code>&gt;</code> symbol directly.</p>

<p>Could you guys tell me how I can do that?</p>

<p>If you could give me an example that would be great.</p>
