<?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[funktionsausgabe in datei ausgeben]]></title><description><![CDATA[<p>hallo, komm auf meinen fehler nicht, vllt kann mir jemand einen tipp geben. es funktioniert so weit alles, nur das ausgeben der funktion in eine text datei will nicht gehen</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;iomanip&gt;
#include &lt;fstream&gt;
using namespace std;

void muster_3ac_ausgaben (int x)
{
     int i,j,b=14;
     for (i=1;i&lt;=x;i++)
    {
        cout &lt;&lt; setw(b);
        b-=1;
        for (j=0;j&lt;i;j++)
        {
            cout &lt;&lt; &quot;1&quot;;
        }
        cout &lt;&lt; &quot;\n&quot;;
    }
}

int main ()
{
    int a;

    cout &lt;&lt; &quot;1234567890&quot;;
    cout &lt;&lt; &quot;1234567890&quot;;

    cin &gt;&gt; a;
    muster_3ac_ausgaben(a);

    ofstream ausgabe(&quot;muster.txt&quot;);
    ausgabe &lt;&lt; muster_3ac_ausgaben(a) &lt;&lt; endl;

    cout &lt;&lt; &quot;\n\n&quot;;
    system(&quot;PAUSE&quot;);
    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/178847/funktionsausgabe-in-datei-ausgeben</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 01:04:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/178847.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 15 Apr 2007 19:33:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to funktionsausgabe in datei ausgeben on Sun, 15 Apr 2007 19:33:33 GMT]]></title><description><![CDATA[<p>hallo, komm auf meinen fehler nicht, vllt kann mir jemand einen tipp geben. es funktioniert so weit alles, nur das ausgeben der funktion in eine text datei will nicht gehen</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;iomanip&gt;
#include &lt;fstream&gt;
using namespace std;

void muster_3ac_ausgaben (int x)
{
     int i,j,b=14;
     for (i=1;i&lt;=x;i++)
    {
        cout &lt;&lt; setw(b);
        b-=1;
        for (j=0;j&lt;i;j++)
        {
            cout &lt;&lt; &quot;1&quot;;
        }
        cout &lt;&lt; &quot;\n&quot;;
    }
}

int main ()
{
    int a;

    cout &lt;&lt; &quot;1234567890&quot;;
    cout &lt;&lt; &quot;1234567890&quot;;

    cin &gt;&gt; a;
    muster_3ac_ausgaben(a);

    ofstream ausgabe(&quot;muster.txt&quot;);
    ausgabe &lt;&lt; muster_3ac_ausgaben(a) &lt;&lt; endl;

    cout &lt;&lt; &quot;\n\n&quot;;
    system(&quot;PAUSE&quot;);
    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1266738</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1266738</guid><dc:creator><![CDATA[fox3]]></dc:creator><pubDate>Sun, 15 Apr 2007 19:33:33 GMT</pubDate></item><item><title><![CDATA[Reply to funktionsausgabe in datei ausgeben on Sun, 15 Apr 2007 19:37:34 GMT]]></title><description><![CDATA[<p>ausgabe.close() vergessen.</p>
<p>MfG SideWinder</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1266744</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1266744</guid><dc:creator><![CDATA[SideWinder]]></dc:creator><pubDate>Sun, 15 Apr 2007 19:37:34 GMT</pubDate></item><item><title><![CDATA[Reply to funktionsausgabe in datei ausgeben on Sun, 15 Apr 2007 19:37:45 GMT]]></title><description><![CDATA[<p>Hmm wo ist denn dein Problem? Dass das so nicht funktionieren kann ist doch klar, weil void kann schlecht ausgegeben werden.</p>
<p>Sonnst übergebe einfach den Stream an die Funktion ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1266745</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1266745</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sun, 15 Apr 2007 19:37:45 GMT</pubDate></item><item><title><![CDATA[Reply to funktionsausgabe in datei ausgeben on Sun, 15 Apr 2007 19:56:33 GMT]]></title><description><![CDATA[<p>ok hab jetzt voin in int umgewandelt aber ich will ja in die datei folgedes schrieben</p>
<p>12345678901234567890 [eingabe von 3]<br />
_____________1<br />
____________11<br />
___________111</p>
<p>(&quot; _ &quot; weg denken sollen leerzeichen sein)</p>
<p>es soll einmal auf dem bildschirm erscheinen und einmal in die datei muster.txt geschriben werden</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1266757</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1266757</guid><dc:creator><![CDATA[fox3]]></dc:creator><pubDate>Sun, 15 Apr 2007 19:56:33 GMT</pubDate></item><item><title><![CDATA[Reply to funktionsausgabe in datei ausgeben on Sun, 15 Apr 2007 20:04:08 GMT]]></title><description><![CDATA[<p>so geht das:</p>
<pre><code class="language-cpp">void muster_3ac_ausgaben( int x, std::ostream&amp; out )
{
    int b=14;
    for( int i=1;i&lt;=x;i++)
    {
        out &lt;&lt; setw(b);
        b-=1;
        for( int j=0;j&lt;i;j++)
        {
            out &lt;&lt; &quot;1&quot;;
        }
        out &lt;&lt; &quot;\n&quot;;
    }
}

int main ()
{
    int a;

    cout &lt;&lt; &quot;1234567890&quot;;
    cout &lt;&lt; &quot;1234567890&quot;;

    cin &gt;&gt; a;
    muster_3ac_ausgaben( a, cout );

    ofstream ausgabe(&quot;muster.txt&quot;);
    muster_3ac_ausgaben( a, ausgabe );
    ausgabe &lt;&lt; endl;

    cout &lt;&lt; &quot;\n\n&quot;;
    system(&quot;PAUSE&quot;);
    return 0;
}
</code></pre>
<p>Gruß<br />
Werner</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1266760</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1266760</guid><dc:creator><![CDATA[Werner Salomon]]></dc:creator><pubDate>Sun, 15 Apr 2007 20:04:08 GMT</pubDate></item><item><title><![CDATA[Reply to funktionsausgabe in datei ausgeben on Sun, 15 Apr 2007 20:08:40 GMT]]></title><description><![CDATA[<p>nicht schlecht, danke schön</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1266761</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1266761</guid><dc:creator><![CDATA[fox3]]></dc:creator><pubDate>Sun, 15 Apr 2007 20:08:40 GMT</pubDate></item><item><title><![CDATA[Reply to funktionsausgabe in datei ausgeben on Sun, 15 Apr 2007 20:21:38 GMT]]></title><description><![CDATA[<p>in etwa die Umsetzung von dem was ich dir gesagt hab.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1266763</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1266763</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sun, 15 Apr 2007 20:21:38 GMT</pubDate></item></channel></rss>