<?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[C++ Anfänger braucht Hilfe bei der Formatierung der Zeilen!]]></title><description><![CDATA[<p>Hallo, ich kann es euch nicht erklären aber probiert diesen quellcode mal aus und ihr werdet sehen was mein Problem ist(Es soll ein Rechteck sein, aber das ist verschoben):<br />
#include &lt;iostream&gt;<br />
#include &lt;conio.h&gt;<br />
#include &lt;fstream&gt;</p>
<p>using namespace std;</p>
<p>int main()<br />
{<br />
int i,j,x,y,hoehe,breite;<br />
ifstream eingabe;<br />
string satz,zeichen;</p>
<p>eingabe.open(&quot;Eingabe.txt&quot;);</p>
<p>while(!eingabe.eof())<br />
{<br />
eingabe&gt;&gt;satz;<br />
eingabe&gt;&gt;x;<br />
eingabe&gt;&gt;satz;<br />
eingabe&gt;&gt;y;<br />
eingabe&gt;&gt;satz;<br />
eingabe&gt;&gt;breite;<br />
eingabe&gt;&gt;satz;<br />
eingabe&gt;&gt;hoehe;<br />
eingabe&gt;&gt;satz;<br />
eingabe&gt;&gt;zeichen;<br />
};<br />
eingabe.close();</p>
<p>for(i=0;i&lt;=y+hoehe;i++)<br />
{<br />
for(j=0;j&lt;=x+breite;j++)<br />
{<br />
if(i&gt;y&amp;&amp;j&gt;x)<br />
{<br />
if(i==y+1||i==y+hoehe) cout&lt;&lt;zeichen;<br />
};<br />
if(i&gt;y&amp;&amp;j&gt;x)<br />
{<br />
if(j==x+1||j==x+breite) cout&lt;&lt;zeichen;<br />
}<br />
if(i&gt;=y+2&amp;&amp;i&lt;=y+hoehe-1) cout&lt;&lt;&quot; &quot;;<br />
}cout&lt;&lt;endl;<br />
};<br />
getch();<br />
}</p>
<p>Bitte helft mir, ich kenne mich mit C++ nicht so gut aus, ich weiß das es eine lächerliche Bitte ist aber ich hab keine Ahnung.<br />
Danke im Voraus!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/160165/c-anfänger-braucht-hilfe-bei-der-formatierung-der-zeilen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Jul 2026 22:03:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/160165.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 22 Sep 2006 15:07:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to C++ Anfänger braucht Hilfe bei der Formatierung der Zeilen! on Fri, 22 Sep 2006 15:07:59 GMT]]></title><description><![CDATA[<p>Hallo, ich kann es euch nicht erklären aber probiert diesen quellcode mal aus und ihr werdet sehen was mein Problem ist(Es soll ein Rechteck sein, aber das ist verschoben):<br />
#include &lt;iostream&gt;<br />
#include &lt;conio.h&gt;<br />
#include &lt;fstream&gt;</p>
<p>using namespace std;</p>
<p>int main()<br />
{<br />
int i,j,x,y,hoehe,breite;<br />
ifstream eingabe;<br />
string satz,zeichen;</p>
<p>eingabe.open(&quot;Eingabe.txt&quot;);</p>
<p>while(!eingabe.eof())<br />
{<br />
eingabe&gt;&gt;satz;<br />
eingabe&gt;&gt;x;<br />
eingabe&gt;&gt;satz;<br />
eingabe&gt;&gt;y;<br />
eingabe&gt;&gt;satz;<br />
eingabe&gt;&gt;breite;<br />
eingabe&gt;&gt;satz;<br />
eingabe&gt;&gt;hoehe;<br />
eingabe&gt;&gt;satz;<br />
eingabe&gt;&gt;zeichen;<br />
};<br />
eingabe.close();</p>
<p>for(i=0;i&lt;=y+hoehe;i++)<br />
{<br />
for(j=0;j&lt;=x+breite;j++)<br />
{<br />
if(i&gt;y&amp;&amp;j&gt;x)<br />
{<br />
if(i==y+1||i==y+hoehe) cout&lt;&lt;zeichen;<br />
};<br />
if(i&gt;y&amp;&amp;j&gt;x)<br />
{<br />
if(j==x+1||j==x+breite) cout&lt;&lt;zeichen;<br />
}<br />
if(i&gt;=y+2&amp;&amp;i&lt;=y+hoehe-1) cout&lt;&lt;&quot; &quot;;<br />
}cout&lt;&lt;endl;<br />
};<br />
getch();<br />
}</p>
<p>Bitte helft mir, ich kenne mich mit C++ nicht so gut aus, ich weiß das es eine lächerliche Bitte ist aber ich hab keine Ahnung.<br />
Danke im Voraus!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1142646</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1142646</guid><dc:creator><![CDATA[C++_Einsteiger]]></dc:creator><pubDate>Fri, 22 Sep 2006 15:07:59 GMT</pubDate></item><item><title><![CDATA[Reply to C++ Anfänger braucht Hilfe bei der Formatierung der Zeilen! on Sun, 24 Sep 2006 15:51:03 GMT]]></title><description><![CDATA[<p>Hi,<br />
ohne das jetzt übersetzt zu haben, würd ich das so hier machen:</p>
<pre><code class="language-cpp">for(int i = 0; i &lt;= y + hoehe; i++) 
{ 
    if (i &gt;= y)
    {
        for(int j = 0; j &lt;= x + breite; j++) 
        {
           if(j &gt;= x)
           {
              cout &lt;&lt; zeichen;
           }
        } 
    }

    cout &lt;&lt; endl;
}
</code></pre>
<p>*untested*</p>
<p>MfG<br />
Alexander Sulfrian</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1143501</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1143501</guid><dc:creator><![CDATA[Alexander Sulfrian]]></dc:creator><pubDate>Sun, 24 Sep 2006 15:51:03 GMT</pubDate></item></channel></rss>