<?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[String über Tastatur eingeben]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>habe ein kleines Konsolen Memoryspiel geschrieben, nun habe ich noch die Abfrage eingebaut, ob ein neues Spiel gestartet werden soll. Allerdings bringt er mir 2 Fehler:</p>
<p>[C++ Fehler] _string.c(62): E2268 Aufruf der undefinierten Funktion 'uninitialized_copy'</p>
<p>[C++ Fehler] _string.c(62): E2034 Konvertierung von 'int' nach 'char *' nicht möglich</p>
<pre><code>string neuBeenden;

cin&gt;&gt;neuBeenden;

    if (neuBeenden == &quot;j&quot;)
    {
       // ...
    }

    else if (neuBeenden == &quot;n&quot;)
    {
      // ...
    }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/281904/string-über-tastatur-eingeben</link><generator>RSS for Node</generator><lastBuildDate>Sun, 23 Aug 2026 11:26:50 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/281904.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 10 Feb 2011 10:13:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to String über Tastatur eingeben on Thu, 10 Feb 2011 10:13:58 GMT]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>habe ein kleines Konsolen Memoryspiel geschrieben, nun habe ich noch die Abfrage eingebaut, ob ein neues Spiel gestartet werden soll. Allerdings bringt er mir 2 Fehler:</p>
<p>[C++ Fehler] _string.c(62): E2268 Aufruf der undefinierten Funktion 'uninitialized_copy'</p>
<p>[C++ Fehler] _string.c(62): E2034 Konvertierung von 'int' nach 'char *' nicht möglich</p>
<pre><code>string neuBeenden;

cin&gt;&gt;neuBeenden;

    if (neuBeenden == &quot;j&quot;)
    {
       // ...
    }

    else if (neuBeenden == &quot;n&quot;)
    {
      // ...
    }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2019052</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2019052</guid><dc:creator><![CDATA[Dennis93]]></dc:creator><pubDate>Thu, 10 Feb 2011 10:13:58 GMT</pubDate></item><item><title><![CDATA[Reply to String über Tastatur eingeben on Thu, 10 Feb 2011 10:41:41 GMT]]></title><description><![CDATA[<p>Dennis93 schrieb:</p>
<blockquote>
<p>...</p>
</blockquote>
<p>Wäre auch schön wenn du uns die Teile des Codes zeigen würdest, die mit dem Fehler zu tun haben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2019064</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2019064</guid><dc:creator><![CDATA[asc]]></dc:creator><pubDate>Thu, 10 Feb 2011 10:41:41 GMT</pubDate></item><item><title><![CDATA[Reply to String über Tastatur eingeben on Thu, 10 Feb 2011 10:47:45 GMT]]></title><description><![CDATA[<p>Danke für deine Antwort.</p>
<pre><code class="language-cpp">if (neuBeenden == &quot;j&quot;)
    {
      neu();                       
      continue;
    }

    else if (neuBeenden == &quot;n&quot;)
    {
      exit(0);
    }
</code></pre>
<p>Ich habe nun aus dem &quot;string neuBeenden&quot; ein char neuBeenden gemacht, dann funktioniert es wunderbar. Trotzdem würde es mich interessieren warum es mit dem string nicht geht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2019066</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2019066</guid><dc:creator><![CDATA[Dennis93]]></dc:creator><pubDate>Thu, 10 Feb 2011 10:47:45 GMT</pubDate></item><item><title><![CDATA[Reply to String über Tastatur eingeben on Thu, 10 Feb 2011 11:04:48 GMT]]></title><description><![CDATA[<p>Dennis93 schrieb:</p>
<blockquote>
<p>Ich habe nun aus dem &quot;string neuBeenden&quot; ein char neuBeenden gemacht, dann funktioniert es wunderbar. Trotzdem würde es mich interessieren warum es mit dem string nicht geht.</p>
</blockquote>
<p>Mit string muss das was du hier zeigst funktionieren, mit char darf das nicht funktionieren. Das darf nicht einmal compilieren. Du zeigst uns nicht das richtige Programm, sondern nur etwas was so ähnlich aussieht.</p>
<p>Hast du auch den Header <code>string</code> eingebunden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2019080</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2019080</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Thu, 10 Feb 2011 11:04:48 GMT</pubDate></item><item><title><![CDATA[Reply to String über Tastatur eingeben on Thu, 10 Feb 2011 11:12:29 GMT]]></title><description><![CDATA[<p>Ja so sieht es aus mit char neuBeenden</p>
<pre><code class="language-cpp">if (neuBeenden == 'j')
    {
      neu();                      
      continue;
    }

    else if (neuBeenden == 'n')
    {
      exit(0);
    }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2019084</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2019084</guid><dc:creator><![CDATA[Dennis93]]></dc:creator><pubDate>Thu, 10 Feb 2011 11:12:29 GMT</pubDate></item><item><title><![CDATA[Reply to String über Tastatur eingeben on Thu, 10 Feb 2011 11:14:20 GMT]]></title><description><![CDATA[<p>Sorry für Doppelpost, aber der Header string ist auch eingebunden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2019085</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2019085</guid><dc:creator><![CDATA[Dennis93]]></dc:creator><pubDate>Thu, 10 Feb 2011 11:14:20 GMT</pubDate></item><item><title><![CDATA[Reply to String über Tastatur eingeben on Thu, 10 Feb 2011 11:28:18 GMT]]></title><description><![CDATA[<p>Steht das #include &lt;string&gt; vor dem #include &lt;iostream&gt;?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2019091</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2019091</guid><dc:creator><![CDATA[rean]]></dc:creator><pubDate>Thu, 10 Feb 2011 11:28:18 GMT</pubDate></item><item><title><![CDATA[Reply to String über Tastatur eingeben on Thu, 10 Feb 2011 11:29:58 GMT]]></title><description><![CDATA[<p>Nein so:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;conio&gt;
#include &lt;string&gt;
using namespace std;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2019092</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2019092</guid><dc:creator><![CDATA[Dennis93]]></dc:creator><pubDate>Thu, 10 Feb 2011 11:29:58 GMT</pubDate></item><item><title><![CDATA[Reply to String über Tastatur eingeben on Thu, 10 Feb 2011 11:53:33 GMT]]></title><description><![CDATA[<p>Dann probiers mal so rum:</p>
<pre><code class="language-cpp">#include &lt;string&gt;
#include &lt;iostream&gt;
#include &lt;conio&gt;
</code></pre>
<p>using namespace std gilt übrigens als schlechter Stil: <a href="http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.5" rel="nofollow">http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.5</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2019102</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2019102</guid><dc:creator><![CDATA[rean]]></dc:creator><pubDate>Thu, 10 Feb 2011 11:53:33 GMT</pubDate></item><item><title><![CDATA[Reply to String über Tastatur eingeben on Thu, 10 Feb 2011 11:57:15 GMT]]></title><description><![CDATA[<p>Also um das mal zu klären: Dieses Programm ist das aus deinem ersten Beitrag um die richtigen Header ergänzt:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;string&gt;
using namespace std; 

int main()
{
 string neuBeenden;

 cin&gt;&gt;neuBeenden;

 if (neuBeenden == &quot;j&quot;)
  {
  }

 else if (neuBeenden == &quot;n&quot;)
  {
  } 
}
</code></pre>
<p>Das ist fehlerfrei. Irgendwo muss ein entscheidender Unterschied zu deinem eigentlichen Programm sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2019106</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2019106</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Thu, 10 Feb 2011 11:57:15 GMT</pubDate></item><item><title><![CDATA[Reply to String über Tastatur eingeben on Thu, 10 Feb 2011 11:58:05 GMT]]></title><description><![CDATA[<p>rean schrieb:</p>
<blockquote>
<p>Dann probiers mal so rum:</p>
<pre><code class="language-cpp">#include &lt;string&gt;
#include &lt;iostream&gt;
#include &lt;conio&gt;
</code></pre>
</blockquote>
<p>Was soll die Reihenfolge damit zu tun haben? Die ist immer vollkommen egal.</p>
<blockquote>
<p>using namespace std gilt übrigens als schlechter Stil: <a href="http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.5" rel="nofollow">http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.5</a></p>
</blockquote>
<p>Nein, so wie es hier verwendet wird ist das absolut in Ordnung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2019108</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2019108</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Thu, 10 Feb 2011 11:58:05 GMT</pubDate></item><item><title><![CDATA[Reply to String über Tastatur eingeben on Thu, 10 Feb 2011 12:15:08 GMT]]></title><description><![CDATA[<p>Danke SeppJ für deine Antwort.</p>
<p>Was mir aufgefallen ist, wenn ich &quot;cin&gt;&gt;neuBeenden&quot;(neuBeenden in dem Fall ein string) auskommentiere, erscheint kein Fehler mehr...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2019113</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2019113</guid><dc:creator><![CDATA[Dennis93]]></dc:creator><pubDate>Thu, 10 Feb 2011 12:15:08 GMT</pubDate></item><item><title><![CDATA[Reply to String über Tastatur eingeben on Thu, 10 Feb 2011 12:23:05 GMT]]></title><description><![CDATA[<p>Dennis93 schrieb:</p>
<blockquote>
<p>Was mir aufgefallen ist, wenn ich &quot;cin&gt;&gt;neuBeenden&quot;(neuBeenden in dem Fall ein string) auskommentiere, erscheint kein Fehler mehr...</p>
</blockquote>
<p>Vielleicht ein Semikolon vergessen?</p>
<p>Tippst du den Code hier im Forum immer von Hand ein? Falls ja: Benutze unbedingt Copy&amp;Paste damit keine Übertragungsfehler stattfinden können.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2019115</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2019115</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Thu, 10 Feb 2011 12:23:05 GMT</pubDate></item><item><title><![CDATA[Reply to String über Tastatur eingeben on Thu, 10 Feb 2011 12:25:22 GMT]]></title><description><![CDATA[<p>Nein immer mit Copy&amp;Paste.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2019116</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2019116</guid><dc:creator><![CDATA[Dennis93]]></dc:creator><pubDate>Thu, 10 Feb 2011 12:25:22 GMT</pubDate></item></channel></rss>