<?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[Probleme mit cin]]></title><description><![CDATA[<p>Ich habe ein Problem mit cin und zwar wenn ich in einem Programm cin habe und dieses ausführe und er kommt zu dem Befehl cin dann kann ich in der Konsole eingeben was ich will aber er macht nicht im Programm weiter egal wie oft ich die Entertaste drücke. Woran kann das liegen? Funktioniert cin mit Ansistrings nicht?<br />
Hier mal ein kleines Beispielprogramm bei dem ich wie erwähnt drücken kann was ich will ohne das er die Befehle nach cin ausführt:</p>
<p>#include &lt;iostream&gt;<br />
#include &lt;vcl.h&gt;<br />
using namespace std;</p>
<p>main()<br />
{<br />
String hallo;<br />
cin &gt;&gt; hallo;<br />
cout &lt;&lt; hallo;<br />
}</p>
<p>Achja ich benutze den Borland C++Builder 2006!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/173627/probleme-mit-cin</link><generator>RSS for Node</generator><lastBuildDate>Fri, 18 Sep 2026 09:32:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/173627.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 18 Feb 2007 02:28:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Probleme mit cin on Sun, 18 Feb 2007 02:42:52 GMT]]></title><description><![CDATA[<p>Ich habe ein Problem mit cin und zwar wenn ich in einem Programm cin habe und dieses ausführe und er kommt zu dem Befehl cin dann kann ich in der Konsole eingeben was ich will aber er macht nicht im Programm weiter egal wie oft ich die Entertaste drücke. Woran kann das liegen? Funktioniert cin mit Ansistrings nicht?<br />
Hier mal ein kleines Beispielprogramm bei dem ich wie erwähnt drücken kann was ich will ohne das er die Befehle nach cin ausführt:</p>
<p>#include &lt;iostream&gt;<br />
#include &lt;vcl.h&gt;<br />
using namespace std;</p>
<p>main()<br />
{<br />
String hallo;<br />
cin &gt;&gt; hallo;<br />
cout &lt;&lt; hallo;<br />
}</p>
<p>Achja ich benutze den Borland C++Builder 2006!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230404</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230404</guid><dc:creator><![CDATA[vampyric_angel]]></dc:creator><pubDate>Sun, 18 Feb 2007 02:42:52 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Sun, 18 Feb 2007 02:58:21 GMT]]></title><description><![CDATA[<p>Hm, ich kenne den Borland nicht, aber der Code ist alles andere als Standard C++- Versuche es doch mit dem folgenden, da muss es aber gehen:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

using namespace std;

int main ()
{
    string hallo;
    cin&gt;&gt;hallo;
    cout&lt;&lt;hallo&lt;&lt;endl;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1230407</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230407</guid><dc:creator><![CDATA[mikey]]></dc:creator><pubDate>Sun, 18 Feb 2007 02:58:21 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Sun, 18 Feb 2007 08:22:57 GMT]]></title><description><![CDATA[<p>Du meinst nicht Punkt 2 in:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-151578.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-151578.html</a><br />
?</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230422</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230422</guid><dc:creator><![CDATA[f.-th.]]></dc:creator><pubDate>Sun, 18 Feb 2007 08:22:57 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Sun, 18 Feb 2007 10:04:01 GMT]]></title><description><![CDATA[<p>gib mal <strong>return 0;</strong> hinten dran,dann gehts <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Example:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

using namespace std;

int main ()
{
    string hallo;
    cin&gt;&gt;hallo;
    cout&lt;&lt;hallo&lt;&lt;endl;
    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1230447</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230447</guid><dc:creator><![CDATA[:Daniel:]]></dc:creator><pubDate>Sun, 18 Feb 2007 10:04:01 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Sun, 18 Feb 2007 11:29:04 GMT]]></title><description><![CDATA[<p>Jo und dann würde das heißen, das er einen Kompiler benutzt, der sich nicht an den Standard hält. return 0 ist bei einer main Funktion nach Standard nicht notwendig.</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;string&gt;

int main()
{
    std::string my_string;
    std::getline(std::cin, my_string);
    std::cout &lt;&lt; my_string &lt;&lt; std::endl;

    return 0;
}
</code></pre>
<p>Wäre wohl die sauberste Lösung. Du hattest im Übrigen noch einen Header vergessen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230496</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230496</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sun, 18 Feb 2007 11:29:04 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Sun, 18 Feb 2007 11:39:46 GMT]]></title><description><![CDATA[<blockquote>
<p>Wäre wohl die sauberste Lösung. Du hattest im Übrigen noch einen Header vergessen.</p>
</blockquote>
<p>Ups, das war dann doch schon die Müdigkeit, sry klar gehört noch string dazu ...</p>
<p>MfG mikey.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230502</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230502</guid><dc:creator><![CDATA[mikey]]></dc:creator><pubDate>Sun, 18 Feb 2007 11:39:46 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Sun, 18 Feb 2007 12:35:00 GMT]]></title><description><![CDATA[<p>Mit string funktionierts erstmal. Danke! Aber kann ich das ganze nicht mit Ansistrings machen? Oder funktioniert cin da nicht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230553</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230553</guid><dc:creator><![CDATA[vampyric_angel]]></dc:creator><pubDate>Sun, 18 Feb 2007 12:35:00 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Sun, 18 Feb 2007 12:39:52 GMT]]></title><description><![CDATA[<p>sry,hab auch &lt;string&gt;-Bibliothek vergessen <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>
<p>sry</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230562</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230562</guid><dc:creator><![CDATA[:Daniel:]]></dc:creator><pubDate>Sun, 18 Feb 2007 12:39:52 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Sun, 18 Feb 2007 12:56:55 GMT]]></title><description><![CDATA[<p>Was verstehst du unter ANSI-Strings?</p>
<p>Aja UNICODE geht nat auch...</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;string&gt;

int wmain()
{
    std::wstring my_string;
    std::getline(std::wcin, my_string);
    std::wcout &lt;&lt; my_string &lt;&lt; std::endl;

    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1230574</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230574</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sun, 18 Feb 2007 12:56:55 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Sun, 18 Feb 2007 13:07:49 GMT]]></title><description><![CDATA[<p>vampyric_angel schrieb:</p>
<blockquote>
<p>Ich habe ein Problem mit cin und zwar wenn ich in einem Programm cin habe und dieses ausführe und er kommt zu dem Befehl cin dann kann ich in der Konsole eingeben was ich will aber er macht nicht im Programm weiter egal wie oft ich die Entertaste drücke. Woran kann das liegen? Funktioniert cin mit Ansistrings nicht?<br />
Hier mal ein kleines Beispielprogramm bei dem ich wie erwähnt drücken kann was ich will ohne das er die Befehle nach cin ausführt:</p>
<p>#include &lt;iostream&gt;<br />
#include &lt;vcl.h&gt;<br />
using namespace std;</p>
<p>main()<br />
{<br />
String hallo;<br />
cin &gt;&gt; hallo;<br />
cout &lt;&lt; hallo;<br />
}</p>
<p>Achja ich benutze den Borland C++Builder 2006!</p>
</blockquote>
<p>AnsiString ist AnsiString nicht String ...</p>
<pre><code class="language-cpp">AnsiString hallo;
cin &gt;&gt; hallo;
cout &lt;&lt; hallo;
</code></pre>
<p>BCB sollte AFAIR einen überladen op &lt;&lt; &gt;&gt; für AnsiStrings haben <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1230579</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230579</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 18 Feb 2007 13:07:49 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Sun, 18 Feb 2007 13:30:01 GMT]]></title><description><![CDATA[<p>Danke! Mein eigentliches Programm funktioniert soweit. Ich hab nur noch ein Problem:<br />
Ich bastel mir einen UPN-Rechner der in einer Konsole ausgeführt wird und will jetzt die Eingaben überprüfen. Kann ich das irgendwie per switch case machen? Da kann man doch eigentlich nur einzelne Zeichen überprüfen ich brauch aber eine Überprüfung eines Strings da ich noch Funktionen wie &quot;inv&quot;, &quot;sqr&quot; usw. in meinem Rechner einbauen muss.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230586</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230586</guid><dc:creator><![CDATA[vampyric_angel]]></dc:creator><pubDate>Sun, 18 Feb 2007 13:30:01 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Sun, 18 Feb 2007 13:58:39 GMT]]></title><description><![CDATA[<p>Was ist ein UPN Rechner ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230605</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230605</guid><dc:creator><![CDATA[mikey]]></dc:creator><pubDate>Sun, 18 Feb 2007 13:58:39 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Sun, 18 Feb 2007 14:35:52 GMT]]></title><description><![CDATA[<p>UPN(umgedrehte polnische Notation) auch Postfixnotation genannt! Wenn du z.B. 3 und 4 addierst schreibst du zuerst die Zahlen und dann das Operationssymbol. Also:<br />
3 4 +<br />
Steht auch alles bei Wikipdia</p>
<p>@Freak_Coder<br />
Aber wenn ich String schreibe also am Anfang groß ist es doch Ansistring oder? Klappt zumindest genau so wenig. Wie gesagt kann so oft auf die Entertaste drücken wie ich will es geht nicht weiter!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230623</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230623</guid><dc:creator><![CDATA[vampyric_angel]]></dc:creator><pubDate>Sun, 18 Feb 2007 14:35:52 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Mon, 19 Feb 2007 02:19:57 GMT]]></title><description><![CDATA[<p>swich case funktionniert nicht mit strings. Bastel dir da halt eine laenger if-ele Kette zusammen</p>
<pre><code class="language-cpp">if(s==&quot;sqr&quot;){
//...
}
else if(s==&quot;sqrt&quot;){
//...
}

//usw
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1230860</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230860</guid><dc:creator><![CDATA[Shinja]]></dc:creator><pubDate>Mon, 19 Feb 2007 02:19:57 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Mon, 19 Feb 2007 03:00:17 GMT]]></title><description><![CDATA[<p>So hab ich es ja zur Zeit. Gibt es da denn keine andere Möglichkeit? Ich weiß nicht aber das sieht doof aus!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230862</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230862</guid><dc:creator><![CDATA[vampyric_angel]]></dc:creator><pubDate>Mon, 19 Feb 2007 03:00:17 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Mon, 19 Feb 2007 06:35:13 GMT]]></title><description><![CDATA[<p>Das sauberste wäre: <a href="http://www.boost.org/libs/spirit/index.html" rel="nofollow">http://www.boost.org/libs/spirit/index.html</a> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230875</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230875</guid><dc:creator><![CDATA[viande]]></dc:creator><pubDate>Mon, 19 Feb 2007 06:35:13 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Mon, 19 Feb 2007 10:23:56 GMT]]></title><description><![CDATA[<p>:Daniel: schrieb:</p>
<blockquote>
<p>gib mal <strong>return 0;</strong> hinten dran,dann gehts <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
...</p>
</blockquote>
<p>Braucht's (für mich überraschenderweise) gar nicht.<br />
Lt. Standard darf ein &quot;return 0&quot; bei main() weggelassen werden ...</p>
<p>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1231025</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1231025</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Mon, 19 Feb 2007 10:23:56 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Mon, 19 Feb 2007 12:01:39 GMT]]></title><description><![CDATA[<p>Simon2 schrieb:</p>
<blockquote>
<p>Braucht's (für mich überraschenderweise) gar nicht.<br />
Lt. Standard darf ein &quot;return 0&quot; bei main() weggelassen werden ...</p>
</blockquote>
<p>Mann sollte auch mal lesen was hier schon geschrieben wurde.</p>
<p>(D)Evil schrieb:</p>
<blockquote>
<p>Jo und dann würde das heißen, das er einen Kompiler benutzt, der sich nicht an den Standard hält. return 0 ist bei einer main Funktion nach Standard nicht notwendig.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1231105</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1231105</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Mon, 19 Feb 2007 12:01:39 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit cin on Mon, 19 Feb 2007 13:08:49 GMT]]></title><description><![CDATA[<p>(D)Evil schrieb:</p>
<blockquote>
<p>Simon2 schrieb:</p>
<blockquote>
<p>Braucht's (für mich überraschenderweise) gar nicht.<br />
Lt. Standard darf ein &quot;return 0&quot; bei main() weggelassen werden ...</p>
</blockquote>
<p>Mann sollte auch mal lesen was hier schon geschrieben wurde.</p>
<p>(D)Evil schrieb:</p>
<blockquote>
<p>Jo und dann würde das heißen, das er einen Kompiler benutzt, der sich nicht an den Standard hält. return 0 ist bei einer main Funktion nach Standard nicht notwendig.</p>
</blockquote>
</blockquote>
<p>Oh, habe ich Deine wertvolle Zeit verschwendet ? <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="😉"
    /><br />
Unerwartetes darf man auch doppelt schreiben und Richtiges wird dadurch auch nicht &quot;fälscher&quot; ....</p>
<p>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1231167</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1231167</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Mon, 19 Feb 2007 13:08:49 GMT</pubDate></item></channel></rss>