I keep Getting Control reaches end of non-void function. What am I doing wrong?
Posted
by Allen
on Stack Overflow
See other posts from Stack Overflow
or by Allen
Published on 2010-04-01T18:09:12Z
Indexed on
2010/04/01
18:13 UTC
Read the original article
Hit count: 290
location pick(void){ // generates a random location
location get;
get.x = rand() % FIELD_SIZE + 1;
int forY = rand() % FIELD_SIZE +1;
switch(forY){
case 1:
get.y = 'a';
break;
case 2:
get.y = 'b';
break;
case 3:
get.y = 'c';
break;
case 4:
get.y = 'd';
break;
case 5:
get.y = 'e';
break;
}
}
© Stack Overflow or respective owner