<?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++ Abbruch mit Esc ohne Enter unter Linux]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte das eine while-schleife solange läuft bis die ESC-Taste gedrückt wird. ungefähr so:</p>
<pre><code>int main ()
{

bool x = true;
  while(x != true)
  {
    std::cout &lt;&lt; &quot;drücke ESC-Taste! \n&quot;;
       if(ESChit())
       break;
  }

return 0;
}
</code></pre>
<p>es soll aber keine Enter-Eingabe nach dem Tastendruck notwendig sein, ähnlich wie kbhit() unter windows.</p>
<p>Hat jemand eine Ahnung wie man das realisieren kann?</p>
<p>Grüße</p>
<p>Guddy</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/233301/c-abbruch-mit-esc-ohne-enter-unter-linux</link><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 01:36:48 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/233301.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 03 Feb 2009 09:22:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to c++ Abbruch mit Esc ohne Enter unter Linux on Tue, 03 Feb 2009 09:22:36 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte das eine while-schleife solange läuft bis die ESC-Taste gedrückt wird. ungefähr so:</p>
<pre><code>int main ()
{

bool x = true;
  while(x != true)
  {
    std::cout &lt;&lt; &quot;drücke ESC-Taste! \n&quot;;
       if(ESChit())
       break;
  }

return 0;
}
</code></pre>
<p>es soll aber keine Enter-Eingabe nach dem Tastendruck notwendig sein, ähnlich wie kbhit() unter windows.</p>
<p>Hat jemand eine Ahnung wie man das realisieren kann?</p>
<p>Grüße</p>
<p>Guddy</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1657044</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1657044</guid><dc:creator><![CDATA[guddy]]></dc:creator><pubDate>Tue, 03 Feb 2009 09:22:36 GMT</pubDate></item><item><title><![CDATA[Reply to c++ Abbruch mit Esc ohne Enter unter Linux on Tue, 03 Feb 2009 14:00:07 GMT]]></title><description><![CDATA[<p>#include &lt;conio.h&gt;</p>
<p>int c = _getch();</p>
<p>ich weis aber nicht obs plattformunabhängig ist...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1657232</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1657232</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Tue, 03 Feb 2009 14:00:07 GMT</pubDate></item><item><title><![CDATA[Reply to c++ Abbruch mit Esc ohne Enter unter Linux on Tue, 03 Feb 2009 14:48:58 GMT]]></title><description><![CDATA[<p>Die Funktion kbhit ist reines C und damit unabhäbgig von dem System einsetzbar.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1657259</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1657259</guid><dc:creator><![CDATA[berniebutt]]></dc:creator><pubDate>Tue, 03 Feb 2009 14:48:58 GMT</pubDate></item><item><title><![CDATA[Reply to c++ Abbruch mit Esc ohne Enter unter Linux on Tue, 03 Feb 2009 15:27:48 GMT]]></title><description><![CDATA[<p>berniebutt schrieb:</p>
<blockquote>
<p>Die Funktion kbhit ist reines C und damit unabhäbgig von dem System einsetzbar.</p>
</blockquote>
<p>Jo, genau wie <code>&lt;conio.h&gt;</code> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1657303</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1657303</guid><dc:creator><![CDATA[Tachyon]]></dc:creator><pubDate>Tue, 03 Feb 2009 15:27:48 GMT</pubDate></item><item><title><![CDATA[Reply to c++ Abbruch mit Esc ohne Enter unter Linux on Tue, 03 Feb 2009 16:36:59 GMT]]></title><description><![CDATA[<pre><code>bool x = true;
while(x != true)
</code></pre>
<p>Tja, was glaubst du was da noch passiert? Genau, nämlich .. nix!<br />
Denn x ist nie nicht true!<br />
Damit wird niemals das in der while-Schleife ausgeführt.<br />
Nimm das ! weg und es sollte passen.<br />
(Kannst da aber auch gleich schreiben &quot;while( true )&quot;)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1657352</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1657352</guid><dc:creator><![CDATA[franz]]></dc:creator><pubDate>Tue, 03 Feb 2009 16:36:59 GMT</pubDate></item><item><title><![CDATA[Reply to c++ Abbruch mit Esc ohne Enter unter Linux on Tue, 03 Feb 2009 17:56:56 GMT]]></title><description><![CDATA[<p>franz schrieb:</p>
<blockquote>
<pre><code>bool x = true;
while(x != true)
</code></pre>
<p>Tja, was glaubst du was da noch passiert? Genau, nämlich .. nix!<br />
Denn x ist nie nicht true!<br />
Damit wird niemals das in der while-Schleife ausgeführt.<br />
Nimm das ! weg und es sollte passen.<br />
(Kannst da aber auch gleich schreiben &quot;while( true )&quot;)</p>
</blockquote>
<p>Sag niemals nie. <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="😉"
    /> (threads und so)</p>
<p>Und das ! wegnehmen reicht nicht. (OK in dem Fall schon, aber man sollte sich den Unterschied von = und == bewusst sein. ;))</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1657422</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1657422</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Tue, 03 Feb 2009 17:56:56 GMT</pubDate></item></channel></rss>