Page 1 of 1

Function warning

Posted: Mon Oct 12, 2015 7:14 pm
by orlanrod
This is working, but i get a warning . I marked where the warning in the line is as 12.

(12) warning: return discards qualifiers from pointer target type|


const char *mytxt[50][50];
int loc;


char* getGameTxt(int txtnum, int txtnumtwo)
{
mytxt[0][0] = "PLAY";
mytxt[1][0] = "OPTIONS";
(12) return (mytxt[txtnum][txtnumtwo]);
}

Re: Function warning

Posted: Mon Oct 12, 2015 10:34 pm
by Stef
Please try to centralize your questions in a same topic, specially for similar issues, we already replied about that warning ("const" versus "no const"). SGDK forum is full of your questions :p

Re: Function warning

Posted: Mon Oct 12, 2015 11:17 pm
by orlanrod
Stef wrote:Please try to centralize your questions in a same topic, specially for similar issues, we already replied about that warning ("const" versus "no const"). SGDK forum is full of your questions :p
Going for full page of my questions, or a sub forum of orlan rod questions. >8p

Oh, i forgot that you answered the compile warning. Whoops, my mistake. I'll make sure next time to look at my posts. 8P