<?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[Problem mit getch in c&#x2F;c++...]]></title><description><![CDATA[<p>Hallo bin neu hier und hab auch schon direkt ein Problem...<br />
Ich möchte mit getch ein Zeichen lesen, ich hab da auch schon was gemacht nur ich möchte den Int-Wert des Zeichens haben...Mein Code...</p>
<pre><code class="language-cpp">do {
key_string = getchar();
if (key_string != 64) 
{
fputc(int(key_string), tmp_file);
fputc('|', tmp_file);
}
} while (key_string != 64);
</code></pre>
<p>Soweit funktionierts auch nur das er halt das ASCII-Zeichen schreibt, also bei der Eingabe A wird auch A geschrieben. Ich möchte aber 64 speichern...<br />
Wie bekomme ich das hin?</p>
<p>Danke schonmal, Gruß Andre</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/257042/problem-mit-getch-in-c-c</link><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 08:08:50 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/257042.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 21 Dec 2009 21:16:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit getch in c&#x2F;c++... on Mon, 21 Dec 2009 21:16:22 GMT]]></title><description><![CDATA[<p>Hallo bin neu hier und hab auch schon direkt ein Problem...<br />
Ich möchte mit getch ein Zeichen lesen, ich hab da auch schon was gemacht nur ich möchte den Int-Wert des Zeichens haben...Mein Code...</p>
<pre><code class="language-cpp">do {
key_string = getchar();
if (key_string != 64) 
{
fputc(int(key_string), tmp_file);
fputc('|', tmp_file);
}
} while (key_string != 64);
</code></pre>
<p>Soweit funktionierts auch nur das er halt das ASCII-Zeichen schreibt, also bei der Eingabe A wird auch A geschrieben. Ich möchte aber 64 speichern...<br />
Wie bekomme ich das hin?</p>
<p>Danke schonmal, Gruß Andre</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1826124</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1826124</guid><dc:creator><![CDATA[andrew]]></dc:creator><pubDate>Mon, 21 Dec 2009 21:16:22 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit getch in c&#x2F;c++... on Mon, 21 Dec 2009 21:29:18 GMT]]></title><description><![CDATA[<p>Indem du den ASCII-Wert von '0' abziehst.</p>
<pre><code>'8' - '0' = 8
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1826129</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1826129</guid><dc:creator><![CDATA[Ad aCTa]]></dc:creator><pubDate>Mon, 21 Dec 2009 21:29:18 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit getch in c&#x2F;c++... on Sat, 26 Dec 2009 19:34:02 GMT]]></title><description><![CDATA[<p>Ok hab ne Lösung zu meinem Problem gefunde...</p>
<pre><code class="language-cpp">do{
				key_string[len_id] = getchar();
				printf(&quot;%c&quot;, key_string[len_id]);
				len_id++;

			}while (key_string[len_id - 1] != '\n' &amp;&amp; len_id &lt; 30);
</code></pre>
<p>Vieleich kann man es mal gebrauchen.<br />
Lg Andre</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1828172</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1828172</guid><dc:creator><![CDATA[andrew]]></dc:creator><pubDate>Sat, 26 Dec 2009 19:34:02 GMT</pubDate></item></channel></rss>