<?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[Hilfe bei der Fehlersuche und Fehlerbehebung]]></title><description><![CDATA[<p>Hallo.</p>
<pre><code>#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

int main()
{
        int blabla = 66;

        for(int a=0; a&lt;4; a++){ 
                switch(blabla){
                case 66:
                        bool zeichenMatrix[6][6] = {
                                {0,1,1,0,0,0},
                                {1,0,0,1,0,0},
                                {1,1,1,1,0,0},
                                {1,0,0,1,0,0},
                                {1,0,0,1,0,0},
                                {0,0,0,0,0,0}};
                break;
                case 67:
                        bool zeichenMatrix[6][6] = {
                                {1,1,1,0,0,0},
                                {1,0,0,1,0,0},
                                {1,1,1,0,0,0},
                                {1,0,0,1,0,0},
                                {1,1,1,0,0,0},
                                {0,0,0,0,0,0}};
                }
                for(int i=0; i&lt;6; i++){
                        for(int x=0; x&lt;6; x++){
                                totalMatrix[x][6*a+i] = zeichenMatrix[x][i];
                        }
                }
        }
}
</code></pre>
<p>Warum bekomme ich diesen Fehler?</p>
<pre><code>matrix3.cpp: In function ‘int main()’:
matrix3.cpp:47:22: error: jump to case label [-fpermissive]
matrix3.cpp:39:9: error:   crosses initialization of ‘bool zeichenMatrix [6][6]’
matrix3.cpp:48:41: error: redeclaration of ‘bool zeichenMatrix [6][6]’
matrix3.cpp:39:9: error: ‘bool zeichenMatrix [6][6]’ previously declared here
matrix3.cpp:58:29: error: ‘zeichenMatrix’ was not declared in this scope
</code></pre>
<p>Was kann ich dagegen tun?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/328510/hilfe-bei-der-fehlersuche-und-fehlerbehebung</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Jul 2026 17:18:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/328510.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 13 Oct 2014 17:49:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hilfe bei der Fehlersuche und Fehlerbehebung on Mon, 13 Oct 2014 17:49:58 GMT]]></title><description><![CDATA[<p>Hallo.</p>
<pre><code>#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

int main()
{
        int blabla = 66;

        for(int a=0; a&lt;4; a++){ 
                switch(blabla){
                case 66:
                        bool zeichenMatrix[6][6] = {
                                {0,1,1,0,0,0},
                                {1,0,0,1,0,0},
                                {1,1,1,1,0,0},
                                {1,0,0,1,0,0},
                                {1,0,0,1,0,0},
                                {0,0,0,0,0,0}};
                break;
                case 67:
                        bool zeichenMatrix[6][6] = {
                                {1,1,1,0,0,0},
                                {1,0,0,1,0,0},
                                {1,1,1,0,0,0},
                                {1,0,0,1,0,0},
                                {1,1,1,0,0,0},
                                {0,0,0,0,0,0}};
                }
                for(int i=0; i&lt;6; i++){
                        for(int x=0; x&lt;6; x++){
                                totalMatrix[x][6*a+i] = zeichenMatrix[x][i];
                        }
                }
        }
}
</code></pre>
<p>Warum bekomme ich diesen Fehler?</p>
<pre><code>matrix3.cpp: In function ‘int main()’:
matrix3.cpp:47:22: error: jump to case label [-fpermissive]
matrix3.cpp:39:9: error:   crosses initialization of ‘bool zeichenMatrix [6][6]’
matrix3.cpp:48:41: error: redeclaration of ‘bool zeichenMatrix [6][6]’
matrix3.cpp:39:9: error: ‘bool zeichenMatrix [6][6]’ previously declared here
matrix3.cpp:58:29: error: ‘zeichenMatrix’ was not declared in this scope
</code></pre>
<p>Was kann ich dagegen tun?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2422029</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2422029</guid><dc:creator><![CDATA[luke666]]></dc:creator><pubDate>Mon, 13 Oct 2014 17:49:58 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei der Fehlersuche und Fehlerbehebung on Mon, 13 Oct 2014 17:55:56 GMT]]></title><description><![CDATA[<p>Ich rate mal, daß Du sowas suchst:</p>
<pre><code>#include &lt;cstdio&gt;
#include &lt;cstdlib&gt;

bool zeichenMatrixA[6][6]= {
	{0,1,1,0,0,0},
	{1,0,0,1,0,0},
	{1,1,1,1,0,0},
	{1,0,0,1,0,0},
	{1,0,0,1,0,0},
	{0,0,0,0,0,0}
};
bool zeichenMatrixB[6][6] = {
	{1,1,1,0,0,0},
	{1,0,0,1,0,0},
	{1,1,1,0,0,0},
	{1,0,0,1,0,0},
	{1,1,1,0,0,0},
	{0,0,0,0,0,0}
};

int main() {
	int blabla = 66;
	bool (*zeichenMatrix)[6];
	for(int a=0; a&lt;4; a++) {
		switch(blabla) {
			case 'A':
				zeichenMatrix=zeichenMatrixA;
				break;
			case 'B':
				zeichenMatrix=zeichenMatrixB;
				break;
		}
		for(int i=0; i&lt;6; i++) {
			for(int x=0; x&lt;6; x++) {
				totalMatrix[x][6*a+i] = zeichenMatrix[x][i];
			}
		}
	}
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2422030</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2422030</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Mon, 13 Oct 2014 17:55:56 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei der Fehlersuche und Fehlerbehebung on Mon, 13 Oct 2014 18:00:55 GMT]]></title><description><![CDATA[<p>Das Probelm wäre dann, dass ich am ende ca. 50 verschiedene Arrays habe. Ich weiß nicht, ob sich das sonderlich positiv auf das programm auswirkt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2422031</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2422031</guid><dc:creator><![CDATA[luke666]]></dc:creator><pubDate>Mon, 13 Oct 2014 18:00:55 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei der Fehlersuche und Fehlerbehebung on Mon, 13 Oct 2014 18:25:29 GMT]]></title><description><![CDATA[<p>luke666 schrieb:</p>
<blockquote>
<p>Das Probelm wäre dann, dass ich am ende ca. 50 verschiedene Arrays habe. Ich weiß nicht, ob sich das sonderlich positiv auf das programm auswirkt.</p>
</blockquote>
<p>Ob die nun im Datensegment oder im Programmsegment liegen, ist doch egal. Die 50 Arrays hast du auf jeden Fall, wenn du die Arrays explizit im Programmcode stehen hast. Wenn du dich wirklich um 1800 Bytes sorgst, dann musst du dir eben eine Rechenvorschrift zur Erzeugung deiner Matrizen ausdenken, um damit Laufzeit gegen Speicherbedarf zu tauschen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2422035</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2422035</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Mon, 13 Oct 2014 18:25:29 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei der Fehlersuche und Fehlerbehebung on Mon, 13 Oct 2014 18:42:23 GMT]]></title><description><![CDATA[<p>luke666 schrieb:</p>
<blockquote>
<p>Das Probelm wäre dann, dass ich am ende ca. 50 verschiedene Arrays habe. Ich weiß nicht, ob sich das sonderlich positiv auf das programm auswirkt.</p>
</blockquote>
<p>Die bool-arrays kannste wiederum in ein Array stopfen, dann isses dreidimensional.</p>
<p>Kannst ein wenig packen, indem Du bits in einem großen int nimmst, statt bools. (Auch evtl in ein Array.)</p>
<pre><code>uint64_t zeichenA=0b\
011000\
100100\
111100\
100100\
100100\
000000\
;
</code></pre>
<pre><code>#include &lt;iostream&gt;
#include &lt;cstdint&gt;
using namespace std;

uint64_t zeichenA=0b\
011000\
100100\
111100\
100100\
100100\
000000\
;

int main() {
	uint64_t zeichen=zeichenA;
	for(int i=0; i&lt;6; i++) {
		for(int x=0; x&lt;6; x++) {
			cout&lt;&lt;&quot; *&quot;[(zeichen&amp;(uint64_t(1)&lt;&lt;35))!=0];
			zeichen&lt;&lt;=1;
		}
		cout&lt;&lt;'\n';
	}
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2422040</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2422040</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Mon, 13 Oct 2014 18:42:23 GMT</pubDate></item></channel></rss>