<?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[if (Eingabe == Entertaste) ?]]></title><description><![CDATA[<p>Hallo,</p>
<p>Wie überprüfe ich ob eine Eingabe gleich Enter ist?</p>
<p>Alle meine Versuche, von EOF über '\n' bis hin zu 0x0D scheiterten leider kläglich.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/258976/if-eingabe-entertaste</link><generator>RSS for Node</generator><lastBuildDate>Tue, 08 Sep 2026 22:05:14 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/258976.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 17 Jan 2010 18:36:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to if (Eingabe == Entertaste) ? on Sun, 17 Jan 2010 18:36:32 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Wie überprüfe ich ob eine Eingabe gleich Enter ist?</p>
<p>Alle meine Versuche, von EOF über '\n' bis hin zu 0x0D scheiterten leider kläglich.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1840371</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1840371</guid><dc:creator><![CDATA[kajam]]></dc:creator><pubDate>Sun, 17 Jan 2010 18:36:32 GMT</pubDate></item><item><title><![CDATA[Reply to if (Eingabe == Entertaste) ? on Sun, 17 Jan 2010 18:49:15 GMT]]></title><description><![CDATA[<p>?</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

int main() {
	char c = 0;
	std::cin.get(c);
	if(c == '\n')
		std::cout &lt;&lt; &quot;Erfolg!&quot;;
	else
		std::cout &lt;&lt; &quot;Fehler!&quot;;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1840376</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1840376</guid><dc:creator><![CDATA[Ad aCTa]]></dc:creator><pubDate>Sun, 17 Jan 2010 18:49:15 GMT</pubDate></item><item><title><![CDATA[Reply to if (Eingabe == Entertaste) ? on Sun, 17 Jan 2010 18:56:32 GMT]]></title><description><![CDATA[<p>Wenn ich es auf diese Art mache und lasse mir die Eingabe dann ausgeben:</p>
<p>Es war: dd<br />
�߄</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1840379</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1840379</guid><dc:creator><![CDATA[kajam]]></dc:creator><pubDate>Sun, 17 Jan 2010 18:56:32 GMT</pubDate></item><item><title><![CDATA[Reply to if (Eingabe == Entertaste) ? on Sun, 17 Jan 2010 19:50:07 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;string&gt;

bool is_empty_input()
{
  std::string input;
  std::getline(input, std::cin);

  return input.empty();
}

int main()
{
  if(is_empty_input())
    std::cout &lt;&lt; &quot;nur enter&quot; &lt;&lt; std::endl;
  else
    std::cout &lt;&lt; &quot;du hast tatsaechlich was eingegeben&quot; &lt;&lt; std::endl;
}
</code></pre>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1840411</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1840411</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Sun, 17 Jan 2010 19:50:07 GMT</pubDate></item><item><title><![CDATA[Reply to if (Eingabe == Entertaste) ? on Sun, 17 Jan 2010 20:06:52 GMT]]></title><description><![CDATA[<p>Nein..</p>
<p>Es wird in jedem Fall etwas eingegeben. Es ist nur nicht von Anfang an klar wie lang es sein wird. der Nutzer soll also durch drücken der Entertaste die Eingabe beenden können.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1840422</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1840422</guid><dc:creator><![CDATA[kajam]]></dc:creator><pubDate>Sun, 17 Jan 2010 20:06:52 GMT</pubDate></item><item><title><![CDATA[Reply to if (Eingabe == Entertaste) ? on Sun, 17 Jan 2010 20:08:30 GMT]]></title><description><![CDATA[<p>und wo liegt dann dein problem?<br />
was hast du denn schon?<br />
und was geht denn da nicht?</p>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1840424</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1840424</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Sun, 17 Jan 2010 20:08:30 GMT</pubDate></item><item><title><![CDATA[Reply to if (Eingabe == Entertaste) ? on Sun, 17 Jan 2010 20:29:14 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">int main()
{	
	char temp[11];
	int i=0;

	while (i&lt;10)
	{
		temp[i] = getch();

		if (temp[i] == '\n'){continue;}
		i++;	
	}

	cout &lt;&lt; &quot;Es war: &quot; &lt;&lt; temp &lt;&lt; endl;

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1840435</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1840435</guid><dc:creator><![CDATA[kajam]]></dc:creator><pubDate>Sun, 17 Jan 2010 20:29:14 GMT</pubDate></item><item><title><![CDATA[Reply to if (Eingabe == Entertaste) ? on Sun, 17 Jan 2010 20:57:23 GMT]]></title><description><![CDATA[<p>Das ist kein ISO-C++! Vergiss diesen conio.h-Schlonz.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1840445</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1840445</guid><dc:creator><![CDATA[Ad aCTa]]></dc:creator><pubDate>Sun, 17 Jan 2010 20:57:23 GMT</pubDate></item><item><title><![CDATA[Reply to if (Eingabe == Entertaste) ? on Sun, 17 Jan 2010 20:59:55 GMT]]></title><description><![CDATA[<p>Das ist keine conio.h, es läuft unter einem Gnu / Linux System.</p>
<p>Ich habe nun einen Fix:</p>
<pre><code class="language-cpp">int main()
{

	char temp[11];
	int i=0;

	while (i&lt;10)
	{
		temp[i] = getch();

		if (temp[i] == '\n'){i++; temp[i] = '\0' ; i=11; }
		i++;

	}

	cout &lt;&lt; &quot;Es war: &quot; &lt;&lt; temp &lt;&lt; endl;

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1840447</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1840447</guid><dc:creator><![CDATA[kajam]]></dc:creator><pubDate>Sun, 17 Jan 2010 20:59:55 GMT</pubDate></item><item><title><![CDATA[Reply to if (Eingabe == Entertaste) ? on Sun, 17 Jan 2010 21:13:19 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/36515">@kajam</a>,<br />
Naja, jedenfalls ist <code>getch</code> kein Standard C und kein Standard C++. Zudem geht das über Standard C++ deutlich einfacher. Unskilled hat dir indirekt sogar eine Lösung gezeigt.</p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1840454</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1840454</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Sun, 17 Jan 2010 21:13:19 GMT</pubDate></item><item><title><![CDATA[Reply to if (Eingabe == Entertaste) ? on Sun, 17 Jan 2010 21:40:28 GMT]]></title><description><![CDATA[<p>getch() ist nach meinem kenntnisstand aber die einzige Möglichkeit die Nutzereingabe nicht ausgeben zu lassen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1840463</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1840463</guid><dc:creator><![CDATA[kajam]]></dc:creator><pubDate>Sun, 17 Jan 2010 21:40:28 GMT</pubDate></item><item><title><![CDATA[Reply to if (Eingabe == Entertaste) ? on Sun, 17 Jan 2010 21:41:49 GMT]]></title><description><![CDATA[<p>kajam schrieb:</p>
<blockquote>
<p>getch() ist nach meinem kenntnisstand aber die einzige Möglichkeit die Nutzereingabe nicht ausgeben zu lassen?</p>
</blockquote>
<p>das ist das erste mal, dass du sagst, dass du das brauchst/haben willst...</p>
<p>jz sag doch erst mal, was du genau haben möchtest..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1840465</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1840465</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Sun, 17 Jan 2010 21:41:49 GMT</pubDate></item><item><title><![CDATA[Reply to if (Eingabe == Entertaste) ? on Fri, 22 Jan 2010 21:09:55 GMT]]></title><description><![CDATA[<p>Ich möchte dass der Nutzer ein variabel langes Passwort eingeben kann und dass diese Eingabe nicht ausgegeben wird.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1843489</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1843489</guid><dc:creator><![CDATA[kajam]]></dc:creator><pubDate>Fri, 22 Jan 2010 21:09:55 GMT</pubDate></item></channel></rss>