<?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[Menu Problem]]></title><description><![CDATA[<p>Hi,..</p>
<p>ich habe ein Problem erstmal mein \1:</p>
<pre><code>#include &quot;stdafx.h&quot;
#include &lt;cstdlib&gt;
#include &lt;iostream&gt;
#include &lt;conio.h&gt;
#include &lt;iomanip&gt;

using namespace std;

char eingabe;
int jaeger[100];
int bomber[100];
int loop;

struct eigendschaften
	{
		int panzerung;
		int staerke;
		int geschwindigkeit;
	};

int _tmain(int argc, _TCHAR* argv[]) 
{ 

   for(loop=1; loop &lt; 100; ++loop)
    {
	  jaeger[loop] = 0;
    }

	    eigendschaften jaeger;
		jaeger.panzerung = 345;
		jaeger.staerke = 80;
		jaeger.geschwindigkeit = 40;

    for(loop=1; loop &lt; 100; ++loop)
    {
	  bomber[loop] = 0;
    }

	    eigendschaften bomber;
		bomber.panzerung = 300;
		bomber.staerke = 120;
		bomber.geschwindigkeit = 10;

 cout &lt;&lt; &quot;\t\t\t\t Kampsystem&quot;;
 cout &lt;&lt; &quot;\n\t\t\t\t\ ----------&quot;;

 cout &lt;&lt; &quot;\n\n\n\n\n\n\t\t&quot;;
 cout &lt;&lt; &quot;Informationen der Schiffe              &lt;1&gt;&quot;;
 cout &lt;&lt; &quot;\n\t\tKampf                                  &lt;2&gt;&quot;;
 cout &lt;&lt; &quot;\n\t\tbeenden                                &lt;3&gt;&quot;;

 cout &lt;&lt; &quot;\n\n\n\n\n\n\t\tIhre Eingabe: &quot;;
 cin &gt;&gt; eingabe;

  system(&quot;cls&quot;);

 switch(eingabe)

         case 1 : cout &lt;&lt; &quot;\n&quot;;
			      cout &lt;&lt; &quot;\t\t\t\t Informationen&quot;;
                  cout &lt;&lt; &quot;\n\t\t\t\t\ -------------&quot;;

				  cout &lt;&lt; &quot;\n\n\n\n\t\t1.Jaeger&quot;;
				  cout &lt;&lt; &quot;\n\n\t\tPanzerung: &quot; &lt;&lt; setw(8) &lt;&lt; jaeger.panzerung;
				  cout &lt;&lt; &quot;\n\t\tStaerke: &quot; &lt;&lt; setw(10) &lt;&lt; jaeger.staerke;
                  cout &lt;&lt; &quot;\n\t\tGeschwindigkeit: &quot; &lt;&lt; jaeger.geschwindigkeit;				

                  cout &lt;&lt; &quot;\n\n\n\n\t\t2. Bomber&quot;;
				  cout &lt;&lt; &quot;\n\n\t\tPanzerung: &quot; &lt;&lt; setw(8) &lt;&lt; bomber.panzerung;
				  cout &lt;&lt; &quot;\n\t\tStaerke: &quot; &lt;&lt; setw(10) &lt;&lt; bomber.staerke;
                  cout &lt;&lt; &quot;\n\t\tGeschwindigkeit: &quot; &lt;&lt; bomber.geschwindigkeit;
				  break;

		 case 2:  cout &lt;&lt; &quot;\n&quot;;
			      cout &lt;&lt; &quot;\t\t\t\t Kampf&quot;;
                  cout &lt;&lt; &quot;\n\t\t\t\t\ --------&quot;;				   

    getch(); 
    return 0; 
}
</code></pre>
<p>und zwar mein mein Compiler (wenn ich case2 mache) es sei ungültig! auch wenn ich das break beim case 1 wegnehme.<br />
Kann mir jemand sagen an was das liegt?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/166036/menu-problem</link><generator>RSS for Node</generator><lastBuildDate>Tue, 15 Sep 2026 03:36:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/166036.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 25 Nov 2006 15:18:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Menu Problem on Sat, 25 Nov 2006 15:18:45 GMT]]></title><description><![CDATA[<p>Hi,..</p>
<p>ich habe ein Problem erstmal mein \1:</p>
<pre><code>#include &quot;stdafx.h&quot;
#include &lt;cstdlib&gt;
#include &lt;iostream&gt;
#include &lt;conio.h&gt;
#include &lt;iomanip&gt;

using namespace std;

char eingabe;
int jaeger[100];
int bomber[100];
int loop;

struct eigendschaften
	{
		int panzerung;
		int staerke;
		int geschwindigkeit;
	};

int _tmain(int argc, _TCHAR* argv[]) 
{ 

   for(loop=1; loop &lt; 100; ++loop)
    {
	  jaeger[loop] = 0;
    }

	    eigendschaften jaeger;
		jaeger.panzerung = 345;
		jaeger.staerke = 80;
		jaeger.geschwindigkeit = 40;

    for(loop=1; loop &lt; 100; ++loop)
    {
	  bomber[loop] = 0;
    }

	    eigendschaften bomber;
		bomber.panzerung = 300;
		bomber.staerke = 120;
		bomber.geschwindigkeit = 10;

 cout &lt;&lt; &quot;\t\t\t\t Kampsystem&quot;;
 cout &lt;&lt; &quot;\n\t\t\t\t\ ----------&quot;;

 cout &lt;&lt; &quot;\n\n\n\n\n\n\t\t&quot;;
 cout &lt;&lt; &quot;Informationen der Schiffe              &lt;1&gt;&quot;;
 cout &lt;&lt; &quot;\n\t\tKampf                                  &lt;2&gt;&quot;;
 cout &lt;&lt; &quot;\n\t\tbeenden                                &lt;3&gt;&quot;;

 cout &lt;&lt; &quot;\n\n\n\n\n\n\t\tIhre Eingabe: &quot;;
 cin &gt;&gt; eingabe;

  system(&quot;cls&quot;);

 switch(eingabe)

         case 1 : cout &lt;&lt; &quot;\n&quot;;
			      cout &lt;&lt; &quot;\t\t\t\t Informationen&quot;;
                  cout &lt;&lt; &quot;\n\t\t\t\t\ -------------&quot;;

				  cout &lt;&lt; &quot;\n\n\n\n\t\t1.Jaeger&quot;;
				  cout &lt;&lt; &quot;\n\n\t\tPanzerung: &quot; &lt;&lt; setw(8) &lt;&lt; jaeger.panzerung;
				  cout &lt;&lt; &quot;\n\t\tStaerke: &quot; &lt;&lt; setw(10) &lt;&lt; jaeger.staerke;
                  cout &lt;&lt; &quot;\n\t\tGeschwindigkeit: &quot; &lt;&lt; jaeger.geschwindigkeit;				

                  cout &lt;&lt; &quot;\n\n\n\n\t\t2. Bomber&quot;;
				  cout &lt;&lt; &quot;\n\n\t\tPanzerung: &quot; &lt;&lt; setw(8) &lt;&lt; bomber.panzerung;
				  cout &lt;&lt; &quot;\n\t\tStaerke: &quot; &lt;&lt; setw(10) &lt;&lt; bomber.staerke;
                  cout &lt;&lt; &quot;\n\t\tGeschwindigkeit: &quot; &lt;&lt; bomber.geschwindigkeit;
				  break;

		 case 2:  cout &lt;&lt; &quot;\n&quot;;
			      cout &lt;&lt; &quot;\t\t\t\t Kampf&quot;;
                  cout &lt;&lt; &quot;\n\t\t\t\t\ --------&quot;;				   

    getch(); 
    return 0; 
}
</code></pre>
<p>und zwar mein mein Compiler (wenn ich case2 mache) es sei ungültig! auch wenn ich das break beim case 1 wegnehme.<br />
Kann mir jemand sagen an was das liegt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1181276</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1181276</guid><dc:creator><![CDATA[Svolf]]></dc:creator><pubDate>Sat, 25 Nov 2006 15:18:45 GMT</pubDate></item><item><title><![CDATA[Reply to Menu Problem on Sat, 25 Nov 2006 15:57:33 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">switch(eingabe)
 {
         case 1 : cout &lt;&lt; &quot;\n&quot;;
                  cout &lt;&lt; &quot;\t\t\t\t Informationen&quot;;
                  cout &lt;&lt; &quot;\n\t\t\t\t\ -------------&quot;;

                  cout &lt;&lt; &quot;\n\n\n\n\t\t1.Jaeger&quot;;
                  cout &lt;&lt; &quot;\n\n\t\tPanzerung: &quot; &lt;&lt; setw(8) &lt;&lt; jaeger.panzerung;
                  cout &lt;&lt; &quot;\n\t\tStaerke: &quot; &lt;&lt; setw(10) &lt;&lt; jaeger.staerke;
                  cout &lt;&lt; &quot;\n\t\tGeschwindigkeit: &quot; &lt;&lt; jaeger.geschwindigkeit;               

                  cout &lt;&lt; &quot;\n\n\n\n\t\t2. Bomber&quot;;
                  cout &lt;&lt; &quot;\n\n\t\tPanzerung: &quot; &lt;&lt; setw(8) &lt;&lt; bomber.panzerung;
                  cout &lt;&lt; &quot;\n\t\tStaerke: &quot; &lt;&lt; setw(10) &lt;&lt; bomber.staerke;
                  cout &lt;&lt; &quot;\n\t\tGeschwindigkeit: &quot; &lt;&lt; bomber.geschwindigkeit;
                  break;

         case 2:  cout &lt;&lt; &quot;\n&quot;;
                  cout &lt;&lt; &quot;\t\t\t\t Kampf&quot;;
                  cout &lt;&lt; &quot;\n\t\t\t\t\ --------&quot;;
                  break;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1181289</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1181289</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Sat, 25 Nov 2006 15:57:33 GMT</pubDate></item></channel></rss>