<?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[Pfeiltasten abfragen]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich wollte ein kleines Spiel in der Konsole programmieren (Snake, wenn das einer kennt).</p>
<p>Nun muß ich dafür die Pfeiltasten abfragen. Um einen Punkt dementsprechend verwenden zu könnn. Aber irgedndwie haut das nicht hin.</p>
<p>Hier ist mal mein bisheriger Code mit Buchstaben anstatt Pfeiltasten.</p>
<pre><code class="language-cpp">int main (void)
{
	int key;
	char symbol[1];
	int x=20;
	int y=20;
	symbol[0]='#';

	do
	{
		fflush(stdin);
		key=getch();
		switch (key)
		{
		case 'w':
			y=y-1;
			break;
		case 'a': 
			x=x-1;
			break;
		case 'd': 
			x=x+1;
			break;
		case 's': 
			y=y+1;
			break;
		default:

		}
		gotoxy(x,y);
		std::cout &lt;&lt; symbol[0];
	}while(key != 'e');

	return 0;
}
</code></pre>
<p>Kann mir jemand sagen, wie ich die Pfeiltasten abfragen kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/211464/pfeiltasten-abfragen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 18:27:15 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/211464.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 23 Apr 2008 14:06:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pfeiltasten abfragen on Wed, 23 Apr 2008 14:06:19 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich wollte ein kleines Spiel in der Konsole programmieren (Snake, wenn das einer kennt).</p>
<p>Nun muß ich dafür die Pfeiltasten abfragen. Um einen Punkt dementsprechend verwenden zu könnn. Aber irgedndwie haut das nicht hin.</p>
<p>Hier ist mal mein bisheriger Code mit Buchstaben anstatt Pfeiltasten.</p>
<pre><code class="language-cpp">int main (void)
{
	int key;
	char symbol[1];
	int x=20;
	int y=20;
	symbol[0]='#';

	do
	{
		fflush(stdin);
		key=getch();
		switch (key)
		{
		case 'w':
			y=y-1;
			break;
		case 'a': 
			x=x-1;
			break;
		case 'd': 
			x=x+1;
			break;
		case 's': 
			y=y+1;
			break;
		default:

		}
		gotoxy(x,y);
		std::cout &lt;&lt; symbol[0];
	}while(key != 'e');

	return 0;
}
</code></pre>
<p>Kann mir jemand sagen, wie ich die Pfeiltasten abfragen kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1496929</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1496929</guid><dc:creator><![CDATA[Bruno++]]></dc:creator><pubDate>Wed, 23 Apr 2008 14:06:19 GMT</pubDate></item><item><title><![CDATA[Reply to Pfeiltasten abfragen on Wed, 23 Apr 2008 14:21:38 GMT]]></title><description><![CDATA[<p>ich habe gerade herausgefunden das ich<br />
für die Pfeiltasten die Zahlen 72, 75, 77 und 80 benutzen muß.</p>
<p>Aber ich verstehe irgendwie nicht warum. Wenn ich in meine ascii Tabelle reinschaue ist z.B. die 80 ein 'P'.</p>
<p>Kann mir das jemand erklären?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1496942</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1496942</guid><dc:creator><![CDATA[Bruno++]]></dc:creator><pubDate>Wed, 23 Apr 2008 14:21:38 GMT</pubDate></item><item><title><![CDATA[Reply to Pfeiltasten abfragen on Wed, 23 Apr 2008 14:34:05 GMT]]></title><description><![CDATA[<p><a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39324-and-highlight-is-pfeiltasten.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-39324-and-highlight-is-pfeiltasten.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1496951</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1496951</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Wed, 23 Apr 2008 14:34:05 GMT</pubDate></item><item><title><![CDATA[Reply to Pfeiltasten abfragen on Wed, 23 Apr 2008 14:35:45 GMT]]></title><description><![CDATA[<p>Es gibt da auch entsprechende Konstanten, die du verwenden kannst (z.B. VK_LEFT, ist aber glaube ich Microsoft-spezifisch).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1496953</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1496953</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Wed, 23 Apr 2008 14:35:45 GMT</pubDate></item><item><title><![CDATA[Reply to Pfeiltasten abfragen on Wed, 23 Apr 2008 14:47:16 GMT]]></title><description><![CDATA[<p>Vielen Dank!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1496963</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1496963</guid><dc:creator><![CDATA[Bruno++]]></dc:creator><pubDate>Wed, 23 Apr 2008 14:47:16 GMT</pubDate></item><item><title><![CDATA[Reply to Pfeiltasten abfragen on Wed, 23 Apr 2008 17:51:52 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-10455.html" rel="nofollow">evilissimo</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-15.html" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-4.html" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1497075</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1497075</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Wed, 23 Apr 2008 17:51:52 GMT</pubDate></item></channel></rss>