<?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[wiederhollung]]></title><description><![CDATA[<p>hi</p>
<p>hätte eine kurze frage an euch undzwar</p>
<p>hab ich hier einen code</p>
<pre><code>#include &lt;iostream&gt;
   #include &lt;vector&gt;
   #include &lt;conio.h&gt;
   using namespace std;

   int main(int argc, char *argv[]) 
{

   vector &lt;string&gt; texte;
   cout&lt;&lt; &quot;&quot; &lt;&lt; endl;
   texte.push_back(&quot;1&quot;);
   texte.push_back(&quot;2&quot;);
   texte.push_back(&quot;3&quot;);
   texte.push_back(&quot;4&quot;);
   texte.push_back(&quot;5&quot;);
   texte.push_back(&quot;5&quot;);

       cout&lt;&lt;texte[rand()%texte.size()]&lt;&lt;endl;

getch();
</code></pre>
<p>und jetzt würde ich gerne machen so das wenn ich z.b 1 drücke die wiederhollung noch mal anfängt und bei 2 die console sich schliesst</p>
<p>danke schon mal im vorraus für jede hilfe <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/topic/170685/wiederhollung</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 03:33:04 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/170685.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 Jan 2007 14:34:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to wiederhollung on Thu, 18 Jan 2007 14:34:55 GMT]]></title><description><![CDATA[<p>hi</p>
<p>hätte eine kurze frage an euch undzwar</p>
<p>hab ich hier einen code</p>
<pre><code>#include &lt;iostream&gt;
   #include &lt;vector&gt;
   #include &lt;conio.h&gt;
   using namespace std;

   int main(int argc, char *argv[]) 
{

   vector &lt;string&gt; texte;
   cout&lt;&lt; &quot;&quot; &lt;&lt; endl;
   texte.push_back(&quot;1&quot;);
   texte.push_back(&quot;2&quot;);
   texte.push_back(&quot;3&quot;);
   texte.push_back(&quot;4&quot;);
   texte.push_back(&quot;5&quot;);
   texte.push_back(&quot;5&quot;);

       cout&lt;&lt;texte[rand()%texte.size()]&lt;&lt;endl;

getch();
</code></pre>
<p>und jetzt würde ich gerne machen so das wenn ich z.b 1 drücke die wiederhollung noch mal anfängt und bei 2 die console sich schliesst</p>
<p>danke schon mal im vorraus für jede hilfe <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/1212078</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1212078</guid><dc:creator><![CDATA[Mango232]]></dc:creator><pubDate>Thu, 18 Jan 2007 14:34:55 GMT</pubDate></item><item><title><![CDATA[Reply to wiederhollung on Thu, 18 Jan 2007 14:49:09 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;conio.h&gt;
using namespace std;

int main(int argc, char *argv[])
{
  char c = '1';
  while( c == '1' )
  {
    vector &lt;string&gt; texte;
    cout&lt;&lt; &quot;&quot; &lt;&lt; endl;
    texte.push_back(&quot;1&quot;);
    texte.push_back(&quot;2&quot;);
    texte.push_back(&quot;3&quot;);
    texte.push_back(&quot;4&quot;);
    texte.push_back(&quot;5&quot;);
    texte.push_back(&quot;5&quot;);

    cout&lt;&lt;texte[rand()%texte.size()]&lt;&lt;endl;

    cin &gt;&gt; c;
  }
  return 0;
}
</code></pre>
<p>so etwa?</p>
<p>//edit: wenn du direkt auf tastendruck weitermachen (nochmal schleife durchlaufen / beenden) willst, geht das glaube ich mit _getch(), aber das habe ich auch noch nie benutzt.</p>
<p>mfg,<br />
julian</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1212084</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1212084</guid><dc:creator><![CDATA[Julian__]]></dc:creator><pubDate>Thu, 18 Jan 2007 14:49:09 GMT</pubDate></item></channel></rss>