C
cousaert
Newsgroups: alt.comp.lang.learn.c-c++
Date: Fri, 27 Aug 2004 12:36:11 +0200
Lines: 36
User-Agent: KNode/0.7.6
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
I get the error "jump to case label" when I try to compile some code with
this in:
int type = randrange(1,1);
int *blok = new int;
switch(type)
{
case 1:
int blok[16] = {0, 0, 0, 0,0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0,
0 };
blok = blok1;
break;
case '2':
int blok1[16] = {0, 0, 0, 0,0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0 };
blok = blok1;
break;
}
Can somebody tell me what I'm doing wrong?
If I try this:
int type = randrange(1,1);
int *blok = new int;
if(type==1)
{
int blok1[16] = {0, 0, 0, 0,0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0 };
blok = blok1;
}
if(type==2)
{
int blok1[16] = {0, 0, 0, 0,0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
blok = blok1;
}
Date: Fri, 27 Aug 2004 12:36:11 +0200
Lines: 36
User-Agent: KNode/0.7.6
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
I get the error "jump to case label" when I try to compile some code with
this in:
int type = randrange(1,1);
int *blok = new int;
switch(type)
{
case 1:
int blok[16] = {0, 0, 0, 0,0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0,
0 };
blok = blok1;
break;
case '2':
int blok1[16] = {0, 0, 0, 0,0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0 };
blok = blok1;
break;
}
Can somebody tell me what I'm doing wrong?
If I try this:
int type = randrange(1,1);
int *blok = new int;
if(type==1)
{
int blok1[16] = {0, 0, 0, 0,0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0 };
blok = blok1;
}
if(type==2)
{
int blok1[16] = {0, 0, 0, 0,0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
blok = blok1;
}