<?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[Unbekanntes problem]]></title><description><![CDATA[<p>ich habe folgenden code geschrieben</p>
<pre><code>void InOutput::ShowMap(int mapwidth, int mapheight, Map mapnum, Player playernum)
{
	int musthavelivepoints = 10;
	int musthavexppoints   = 10;
	int counter            = 1;

	for (int y = 0; y &lt; 80; y++)
	{
		for (int x = 0; x &lt; 24; x++)
		{
			if (y &gt;= 0 &amp;&amp; y &lt;= 11 &amp;&amp; x == 0)
			{
				if (y == 0)
				{
					cout &lt;&lt; &quot;&lt;&quot;;
				}
				else if (y == 11)
				{
					cout &lt;&lt; &quot;&gt;&quot;;
				}
				else if (y == counter)
				{
					if (playernum.LivePoints &gt;= musthavelivepoints)
					{
						cout &lt;&lt; &quot;O&quot;;
					}
					else 
					{
						cout &lt;&lt; &quot; &quot;;
					}

					musthavelivepoints = musthavelivepoints + 10;
					counter            = counter            + 1;
				}
			}
			else
			{
				if (playernum.Y_player == y &amp;&amp; playernum.X_player == x)
				{
					cout &lt;&lt; &quot;P&quot;;
				}
				else
				{
					if (mapnum.Map1[y][x].InUse == true)
					{
						cout &lt;&lt; &quot;X&quot;;
					}
					else
					{
						cout &lt;&lt; &quot;.&quot;;
					}
				}
			}
		}
	}
};
</code></pre>
<p>ich weiss es ist nicht der beste aber ich habe ein grosses problem damit. wenn ich es debugge kommt sowas in der art raus</p>
<pre><code>&lt;.....................O........................O..........
..........O......................O..............O...........O......
................O...................O............................O.....
....................O.....................&gt;
</code></pre>
<p>wo ist der fehler ???</p>
<p>danke schonmal im vorraus</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/319658/unbekanntes-problem</link><generator>RSS for Node</generator><lastBuildDate>Sat, 25 Jul 2026 04:10:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/319658.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 27 Aug 2013 20:00:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Unbekanntes problem on Tue, 27 Aug 2013 20:00:22 GMT]]></title><description><![CDATA[<p>ich habe folgenden code geschrieben</p>
<pre><code>void InOutput::ShowMap(int mapwidth, int mapheight, Map mapnum, Player playernum)
{
	int musthavelivepoints = 10;
	int musthavexppoints   = 10;
	int counter            = 1;

	for (int y = 0; y &lt; 80; y++)
	{
		for (int x = 0; x &lt; 24; x++)
		{
			if (y &gt;= 0 &amp;&amp; y &lt;= 11 &amp;&amp; x == 0)
			{
				if (y == 0)
				{
					cout &lt;&lt; &quot;&lt;&quot;;
				}
				else if (y == 11)
				{
					cout &lt;&lt; &quot;&gt;&quot;;
				}
				else if (y == counter)
				{
					if (playernum.LivePoints &gt;= musthavelivepoints)
					{
						cout &lt;&lt; &quot;O&quot;;
					}
					else 
					{
						cout &lt;&lt; &quot; &quot;;
					}

					musthavelivepoints = musthavelivepoints + 10;
					counter            = counter            + 1;
				}
			}
			else
			{
				if (playernum.Y_player == y &amp;&amp; playernum.X_player == x)
				{
					cout &lt;&lt; &quot;P&quot;;
				}
				else
				{
					if (mapnum.Map1[y][x].InUse == true)
					{
						cout &lt;&lt; &quot;X&quot;;
					}
					else
					{
						cout &lt;&lt; &quot;.&quot;;
					}
				}
			}
		}
	}
};
</code></pre>
<p>ich weiss es ist nicht der beste aber ich habe ein grosses problem damit. wenn ich es debugge kommt sowas in der art raus</p>
<pre><code>&lt;.....................O........................O..........
..........O......................O..............O...........O......
................O...................O............................O.....
....................O.....................&gt;
</code></pre>
<p>wo ist der fehler ???</p>
<p>danke schonmal im vorraus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2348881</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2348881</guid><dc:creator><![CDATA[WhileTrueDo]]></dc:creator><pubDate>Tue, 27 Aug 2013 20:00:22 GMT</pubDate></item><item><title><![CDATA[Reply to Unbekanntes problem on Tue, 27 Aug 2013 20:05:09 GMT]]></title><description><![CDATA[<p>Eine Beschreibung, was du erreichen willst und an welche Teile der Ausgabe falsch sind, wäre auch nicht schlecht.<br />
So kann man nur sagen, dass der Code ganz genau das tut, was er soll und keine fiesen Fallen versteckt sind.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2348883</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2348883</guid><dc:creator><![CDATA[Marthog]]></dc:creator><pubDate>Tue, 27 Aug 2013 20:05:09 GMT</pubDate></item><item><title><![CDATA[Reply to Unbekanntes problem on Tue, 27 Aug 2013 20:05:12 GMT]]></title><description><![CDATA[<p>Beantworte zunächst folgende Fragen:</p>
<ul>
<li>Was <strong>sollte</strong> die Ausgabe sein?</li>
<li>Wofür ist diese Funktion?</li>
<li>Was sind die Datentypen <code>Map</code> und <code>Player</code> ?</li>
</ul>
<p>Deiner Frage fehlt jeglicher Kontext. So muss man sich hier mit Raterei abplagen, auf die hier (selbstverständlich) keiner Lust hat.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2348884</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2348884</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Tue, 27 Aug 2013 20:05:12 GMT</pubDate></item><item><title><![CDATA[Reply to Unbekanntes problem on Tue, 27 Aug 2013 20:21:20 GMT]]></title><description><![CDATA[<p>Wenigstens ist der Titel passend gewählt. Dein Problem ist absolut unbekannt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2348888</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2348888</guid><dc:creator><![CDATA[selfcontained]]></dc:creator><pubDate>Tue, 27 Aug 2013 20:21:20 GMT</pubDate></item><item><title><![CDATA[Reply to Unbekanntes problem on Tue, 27 Aug 2013 20:27:05 GMT]]></title><description><![CDATA[<p>also player und map sind zwei klassen die ich erstellt habe und ich habe in der map.h ein 2d array erstellt welches 80 x 24 b.z.w 79 x 23 ist. ich möchte dieses array ausgeben aber das geschilderte problem ist nicht das einzige. ich habe außerdem das problem, dass wenn ich meine player koordinaten auf 6 und 6 setze, der player ober rechts im bild erscheint</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2348891</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2348891</guid><dc:creator><![CDATA[WhileTrueDo]]></dc:creator><pubDate>Tue, 27 Aug 2013 20:27:05 GMT</pubDate></item><item><title><![CDATA[Reply to Unbekanntes problem on Tue, 27 Aug 2013 20:38:59 GMT]]></title><description><![CDATA[<p>Das beantwortet keine der gestellten Fragen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2348895</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2348895</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Tue, 27 Aug 2013 20:38:59 GMT</pubDate></item><item><title><![CDATA[Reply to Unbekanntes problem on Tue, 27 Aug 2013 20:41:44 GMT]]></title><description><![CDATA[<p>WhileTrueDo schrieb:</p>
<blockquote>
<p>also player und map sind zwei klassen die ich erstellt habe und ich habe in der map.h ein 2d array erstellt welches 80 x 24 b.z.w 79 x 23 ist. ich möchte dieses array ausgeben aber das geschilderte problem ist nicht das einzige. ich habe außerdem das problem, dass wenn ich meine player koordinaten auf 6 und 6 setze, der player ober rechts im bild erscheint</p>
</blockquote>
<p>Das beantwortet nicht wirklich die Fragen. Insbesondere nicht:</p>
<p>Sone schrieb:</p>
<blockquote>
<ul>
<li>Was <strong>sollte</strong> die Ausgabe sein?</li>
</ul>
</blockquote>
<p>Marthog schrieb:</p>
<blockquote>
<p>Eine Beschreibung, was du erreichen willst und an welche Teile der Ausgabe falsch sind, wäre auch nicht schlecht.</p>
</blockquote>
<p>Im Gegenteil: Es wirft mehr Fragen auf, was dein zweites Problem ist, welches du ebenfalls unzureichend beschreibst.</p>
<p>Ich rate einfach mal: Du willst die x- und die y-Schleife andersherum haben.</p>
<p>Falls es das nicht ist: Weiter gucke ich mir dein Problem nur an, wenn du eine brauchbare Problembeschreibung abgibst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2348898</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2348898</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Tue, 27 Aug 2013 20:41:44 GMT</pubDate></item><item><title><![CDATA[Reply to Unbekanntes problem on Wed, 28 Aug 2013 08:02:22 GMT]]></title><description><![CDATA[<p>Und ich rate mal weiter:<br />
es fehlt wohl ein Zeilenumbruch nach jeder Zeile <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";-)"
      alt="😉"
    /></p>
<pre><code class="language-cpp">for (int y = 0; y &lt; 80; y++)
{
    for (int x = 0; x &lt; 24; x++)
    {
         // ...
    }

    cout &lt;&lt; '\n';
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2348948</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2348948</guid><dc:creator><![CDATA[Th69]]></dc:creator><pubDate>Wed, 28 Aug 2013 08:02:22 GMT</pubDate></item></channel></rss>