Function warning

SGDK only sub forum

Moderator: Stef

Post Reply
orlanrod
Very interested
Posts: 99
Joined: Fri Sep 25, 2015 7:46 pm

Function warning

Post by orlanrod » Mon Oct 12, 2015 7:14 pm

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]);
}

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Function warning

Post by Stef » Mon Oct 12, 2015 10:34 pm

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

orlanrod
Very interested
Posts: 99
Joined: Fri Sep 25, 2015 7:46 pm

Re: Function warning

Post by orlanrod » Mon Oct 12, 2015 11:17 pm

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

Post Reply