<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[cout&#x27;s umleiten]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich leite meine Ausgaben in der Konsole mit</p>
<pre><code>freopen (log.txt,&quot;w&quot;,stdout);
</code></pre>
<p>um und dies funktioniert.</p>
<p>Jedoch möchte ich am ende des Programms wieder eine Zeile in der Konsole ausgeben und müsste es wieder umleiten jedoch kenne ich das Ziel nicht.</p>
<p>Hat jemand eine Ahnung wie man das wieder rückgängig machen kann oder was die Konsole für eine Adresse hat?</p>
<p>Vielen Dank und Gruss</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/175573/cout-s-umleiten</link><generator>RSS for Node</generator><lastBuildDate>Sat, 19 Sep 2026 04:53:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/175573.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 12 Mar 2007 08:30:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to cout&#x27;s umleiten on Mon, 12 Mar 2007 08:30:08 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich leite meine Ausgaben in der Konsole mit</p>
<pre><code>freopen (log.txt,&quot;w&quot;,stdout);
</code></pre>
<p>um und dies funktioniert.</p>
<p>Jedoch möchte ich am ende des Programms wieder eine Zeile in der Konsole ausgeben und müsste es wieder umleiten jedoch kenne ich das Ziel nicht.</p>
<p>Hat jemand eine Ahnung wie man das wieder rückgängig machen kann oder was die Konsole für eine Adresse hat?</p>
<p>Vielen Dank und Gruss</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1243769</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1243769</guid><dc:creator><![CDATA[flownfluid]]></dc:creator><pubDate>Mon, 12 Mar 2007 08:30:08 GMT</pubDate></item><item><title><![CDATA[Reply to cout&#x27;s umleiten on Mon, 12 Mar 2007 08:35:40 GMT]]></title><description><![CDATA[<p>In C dürfte das nicht so einfach sein, aber in C++ hast du da bessere Kontrolle:</p>
<pre><code class="language-cpp">streambuf* coutbuf=cout.rdbuf();
fstream logfile(&quot;log.txt&quot;);
cout.rdbuf(logfile.rdbuf);
...
//alle Ausgaben landen im Log-File
...
cout.rdbuf(coutbuf);
cout&lt;&lt;&quot;Auf Wiedersehen&quot;&lt;&lt;endl;// das kommt wieder auf den Bildschirm
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1243770</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1243770</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Mon, 12 Mar 2007 08:35:40 GMT</pubDate></item><item><title><![CDATA[Reply to cout&#x27;s umleiten on Mon, 12 Mar 2007 09:17:39 GMT]]></title><description><![CDATA[<p>Vielen Dank für die Antwort, nach meiner Meinung hats da noch ein paar kleine Fehler und somit für die Nachwelt :</p>
<pre><code>streambuf* coutbuf=cout.rdbuf();
fstream logfile(&quot;log.txt&quot; , ios::out);
cout.rdbuf(logfile.rdbuf());
...
//alle Ausgaben landen im Log-File
...
cout.rdbuf(coutbuf);
cout&lt;&lt;&quot;Auf Wiedersehen&quot;&lt;&lt;endl;// das kommt wieder auf den Bildschirm
</code></pre>
<p>Vielen Dank für die schnelle Antwort...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1243795</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1243795</guid><dc:creator><![CDATA[flownfluid]]></dc:creator><pubDate>Mon, 12 Mar 2007 09:17:39 GMT</pubDate></item></channel></rss>